I seem to remember being able to see text of all the notes contained in a note when I clicked on the preview tab of a note.
Currently I only see the text of the note itself.
Can you remind me what the issue is? I think it’s to do with the template that I have, but dont know how to set the right default.
Many thanks
Thomas
Assuming you are using the built-in templates:
- “HTML Single Note” exports† only the currently selected note as a single HTML file.
- “HTML page” exports the current note and all descendant notes as a single HTML file.
- This actually installs *two templates (one nested under the other‡)
- This was the original/only HTML export template (called “HTML”, as you might see in old demos). There is no ‘right’ choice here, it is all down to the users assumptions about HTML export might work.
- “Preview”. By default this acts the same as “HTML Single Note”.
I suggest you install both the above built-in templates to a new TBX. Add a container note with some descendants, then set the container to use—in turn—each of the templates.
If you want Preview node to act in the container-and-contents scope (i.e. like “HTML page”), then if “HTML page” and its associated “HTML item” are already installed, thin in template “Preview” find this line:
^text^
and replace it with:
^text^
^children(/Templates/HTML page/HTML item)^
Preview mode will now show the current note content and that of all descendants.
†. ‘Preview’ mode is only showing already-exported HTML. For ‘internal’ use, i.e. preview-only, the necessary HTML is generated hidden away and managed by Tinderbox. So, if preview fails it is always worth looking at the code in the export tab—at least, if you have some understanding of HTML.
‡. Don’t be confused by the testing of the templates. It is simply to suggest their connected nature (you need both). The nesting itself has zero effect in terms of how the templates work. The ‘HTML page’ template calls the ‘HTML item’ template repeated for each descendant note’s content it has to export (preview).
@mwra is right…I bet the note is using the preview template. Use can open the inspector, go to the Export Inspector (“<>” button) and check what template is being use.
Thank you, much appreciated. I, as a lay person, cannot really understand what is going on, but by replacing HTML Single Note with HTML Page in every single note (using the export inspector) it seems to work correctly. Im not sure if my code for the preview template is right, (Its seemed to be missing a ^ after the word ‘text’ ) but this is what I have got it as now. Is that supposed to set the default for any note preview?
Its now this:
All the best
Thomas
Ah, sorry for the confusion. The closing caret on Export codes is optional. So, ^text
and ^text^
are functionally similar. If the closing caret is omitted the TBX parser figures out where the export code ends. Use whichever notation you prefer.
If you want the internal preview, This is what your Preview template note’s $Text should look like amended to use descendant content.
<html>
<head>
<meta charset="utf-8">
<title>^title^</title>
<style>
^text(/Hints/Preview/style,plain)
</style>
</head>
<body>
^text
^children(/Templates/HTML page/HTML item)
</body>
</html>