Exporting Notes within Notes

Choosing which export template can be tricky, especially for notes within notes. I have found that the export template specified in an include [e.g. ^include(notename, exporttempl.html)], will trump the export template specified by the child notes in their HTMLExportTemplate attribute. Keep this in mind and you can avoid the dreaded page within a page problem.
Here is something else to keep in mind when dealing with notes within notes:
The export of the note within a note can be specified in a couple of ways.
First, by the HTMLExportTemplate attribute of the note itself.
Or, secondly, by the export template of the container note (the parent note). This specification will trump the childrens HTMLExportTemplate assignement. (This is a feature I am still only now appreciating!)
So, the main template exports the right sidebar note (say the note RightSidebar) with an include:
^include(RightSidebar)
The export template of RightSidebar is specified by the HTMLExportTemplate attribute of that note: = sidebar.html. Finally, sidebar.html includes the children AND specifies the export template that will be used with a . This trumps the export template defined by the children, so as to avoid the page within the page proplem or the circular include messages.
P.S. As an added subtlety, note that by specifying the export template within the parents export template, you are no longer free to use different templates for the children by specifying different values for HTMLExportTemplate for each child. Because, the export specified by trumps the children's HTMLExportTemplate.
Whew! Hope this helps.
--- Ryan Holcomb 2005 --
|