How are templates found?

(Marmaduke Woodman) #1

I’m trying to export a document to a single Markdown file, to then use Pandoc to convert to a presentation.

When not using the built in templates, I’m seeing only “Unable to find this template” in the exported file, and I’d like to understand why: I’ve created template notes and set HTMLExportTemplate attribute to those notes’ paths on prototypes which I then use in the notes constituting the presentation contents.

When I use the builtin example e.g. OPML and modify the template to generate Markdown, it works, so I’m a little puzzled. Does HTMLExportTemplate need to be set in the note and not its prototype?

In case someone has a second to look I’m attaching the Tbx file with minimal example of what I’m trying.

Thanks in advance for what seems a simple misunderstanding on my part.Export4.tbx (63.6 KB)

(Galen Menzel) #2

The only exported html file is Exports.html. This is created because the container note named “Exports” has $HTMLDontExport set to false (or equivalently it has the “Export” checkbox checked in the Export tab of the HTML inspector). Its HTMLExportTemplate attribute is not set, so Tinderbox dutifully exports the file, but generates an error.

The notes in the “Talk” container are not exported because their prototype (“MDSection”) has $HTMLDontExport set to true (i.e., the “Export” checkbox is not checked in the HTML inspector). Change this setting in the prototype, and the notes will be exported (though you most likely still have some work ahead of you to get them to look like you want them to look).

By the way, both of your templates are also defined to be prototypes, which prevents them from showing up in the Templates drop-down menu in the HTML inspector. You probably want to make them just templates, and not template prototypes.

(Marmaduke Woodman) #3

@galen I’m sorry you felt it necessary to withdraw your post, as HTMLDontExport was precisely the attribute I needed to look at. It is working perfectly now.

(Galen Menzel) #4

Ok, undeleted. After I posted, I reread your initial question and saw that you were trying to only produce a single markdown file, and I thought my answer had missed the mark. Glad it helped.