I noticed that this aTbRef page (since fixed) had no content. The page is exported from an alias. Its original, in the ‘Formatting’ section of the doc, has this body as its entire $Text:
^childLinks^
IOW, only a single export command, to produce this page. I assumed that as an alias shares its original’s links that the export code would create the same. Also, I recall agent queries can test descendants of the aliases original even though the alias has none itself. Anyway, the empty body text in the (now-fixed) page showed me that ^childLinks^
is evaluated in the current (alias) context and as the alias has no children, no links are generated.
Bother. ^childLinks^
doesn’t allow an offset reference, e.g. ^childLinks(original)^
(this won’t work), so more cumbersome work-around is needed. Thus, the original note in the TBX now has this code. There it is all in one line but broken out here to show the structure:
^if($IsAlias)^
^include("Support for other app-specific formats","body_text_only")^
^else^
^childLinks^
^endIf^
The template ‘body_text_only’ just contains the code ^text^
. Now the original works as before. The alias, now fetches the export-evaluated $Text of the original - i.e. an HTML link list of the original’s children and uses that as the aliases own body copy for the exported page.
Note, we can’t use ^value($Text(original))^
for the alias as that would be returned verbatim as “^childLinks^”, i.e. not export-evaluated into the HTML list.
I hope that saves others a bit of head-scratching if they too encounter this scenario.