This version is out of date, covering development from v8.0.0 to v8.x.x. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v8 Icon

Traversing non-exporting notes

Occasionally it may be needed to access data from descendant notes that are descended via notes that do not export. The latter might exist only as internal structuring of the internal document outline. Consider this layout:

2015 Articles
     January
          Article A
          Article B
     February
          Article C
          Article D

You might want the 2015 articles pages to list all articles with month heading but do not need any per-month pages. Thus the root note might export:

Traversing non-exporting notes

The latter template might have code like:

Traversing non-exporting notes

As per-month pages are not needed, it might seem logical to set $HTMLDontExport to true for the month containers. However, that means the 'month' template above is never evaluated and so the main note is missing some data. Conversely, leaving the export on generates unwanted pages for the month container notes

The secret here is to let the per-month container notes still export but to use a blank template, i.e. a template with no code or even HTML comments, i.e. no $Text at all. As Tinderbox will not generate an empty file, no HTML exported file is emitted during export but the above templates can still work.

This scenario is an edge case that shows the flexibility offered by Tinderbox's export methods.