I am trying to preview the contents of the children of a selected folder that is further down in the outline. However, only the contents of the children of the folder that is at the top of the outline are displayed. I am using the HTMLExportTemplate. I wish I could attach the small TB test file.
You can attach a Tinderbox file: use the icon in the editor box with an upward-pointing arrow.
What is the value of $HTMExportTemplate, e.g., âHTML Pageâ? Have you modified the template in any way? You can also provide screenshots.
Here are the tbx file and a screenshot
PreviewJumptoTop.tbx (202.2 KB)
Hmm. there is a lot of evidence of failed tweaking here. After a while, testing preview, I find the file deletes the log containers and contents. I canât find any action code but the smell of it is too much tinkering without removing each failed tests changes before starting a new test.
Some obvious errors:
- The HTML template has been added without the usual (built-in) prototype âHTMLâ. [Added and applied prototype to template notes]
- The log containers are using the âHTML itemâ template which is only intended for *includedâ content. the correct choice should be âHTML pageâ. This caused by wrong default set via prototype pLog. [set correct choice in prototype]
- The note âFri, Jul 18 2025â contains date f
PreviewJumptoTop.tbx (239.7 KB)
or days logged in the second container. More evidence of failed experiments. [Fixed by deleting data not for data of note title] - The âffâ in the names of containers are there for what reason. [deleted as no apparent need.]
- The document default for $OnAdd is
$Prototype="pMyPrototype";
. There is no such prototype! [reset attributeâs default a doc level]
Fixed all that but previewing containers has same problem, on previewing container #2, #1 is selected. Hm. Renamed container #2 and problem stopped. Aha! Checked the default for HTMLFileNameMaxLength and is is 8
. What? That default value changed in v3.0.3 from 8
to 24
characters (see) ⌠back in March 2006!
See the problem? With a setting of 8 both containers have an export/preview filename of âDaily Lâ. Setting the correct current doc-level default to the HTMLFileNameMaxLength default of 24
and problem is fixed.â
Learning points:
- Unless a very experienced user, do not base new projects off very old files. Make a new file with current defaults and port across note(s)/code from older files fixing effors as you go.
This file now works as expected (I think!):
PreviewJumptoTop.tbx (238.5 KB)
But, rather than build on sand, here is the same in a Tinderbox v10.2.0 new file:
PreviewJumptoTop-new.tbx (207.1 KB)
An interesting Saturday evening puzzler
â . âBehind the curtainâ the app makes an HTML export of the note and it is the non=unique names of those files that were causing your issue.
Thank you Mark. Indeed it works now as it should. And as you suspected what I submitted was generated from a more elaborate file. Handling the problem in a small tbx was trying to keep it simple and (perhaps) easier to handle. Unfortunatly I was not aware that TB would remember most if not all of my previous messy manipulations. Lesson learned: better start fresh!
This is a good general approach. It is also good if trying a new technique: if it works in a small test and not in the bigger file, some extra interaction is occurring.
Iâll admit the cause of your original problem was a real head-scratcher as itâs not obvious to most users that the text pane preview is actually a web browser view of an HTML export of the note. By default this is done internally by the app (and files then cleaned up for you by the app). I stumbled on the cause when I accidentally mis-editing a file name and the change was in the first 8 characters of the containerâs name: then the penny dropped as to the possible cause. HTH.
BTW, if unsure about whether system attribute defaults in your older files might have changed in newer versions, see aTbRefâs listing of system attributes. When copying notes from old to new files, any attributes inheriting defaults will inherit the new files defaults. But for $Text it is a good idea to copy the text and paste-and-match-style into the new note if you want to adopt current settings. Think beyond the font/size but consider pargins, tabes, line(paragraph) spacing, etc.
The basic problem seems to be that I am a rather old unexperienced user going back to version 3 :-). Hope you got some satisfaction from soving the puzzle, and I am indeed grateful that you did.
On the upside, imagine trying to do the equivalent version bridge in something like MS Word
Iâd agree it is a judgement call whether to try and update a TBX made in a much older version or to start over and copy over notes. There is no simple right answer. In context, 8
character filenames for web pages werenât so odd back when Tinderbox first came out in2001, but changed the current default of 24
in early 2003. Conversely, the current preview mechanism dates from v9.5.0 (December 2022). Despite Tinderboxâs admirable support for old files, sometimes it throws up oddities like this. Donât be put off experimenting, and asking in the forum was a good idea.