This version is out of date, covering development from v4.6.0 to v4.7.1. It is maintained here only for inbound reference links from elsewhere. Jump to the current version of aTbRef. |
|
A Tinderbox Reference File : Export Codes : Export Code Scope : Item-based : ^ancestors( start, list-item-prefix, list-item-suffix, end )^ | aTbRef Site Map |
^ancestors( start, list-item-prefix, list-item-suffix, end )^ |
Code Type: | Link Creation |
Code Scope of Action: | item |
^ancestors( "start", "list-item-prefix", "list-item-suffix", "end" )^
returns links to all of the ancestors of this note (if any). Unlike the pre-v.4.6 format of links in a single line, with colons between the elements, this now defaults to an HTML unordered list like other list-generating codes. This allows you to format the group of links as an HTML list or table in the exact format you want, where "start" is quote-enclosed text that will be inserted before all of the links, "end" is text that will be inserted after all of the links, "list-item-prefix" is text that will be inserted before each link, and "list-item-suffix" is text that will be inserted after each link.
If "Hierarchical lists" in the HTML pane of the preferences is unchecked, this will not work.
Mark-up (export code) elements embedded in ^ancestors^ are evaluated.
To get the pre-v.4.6 format use:
^ancestors("",""," : ","")^
Exported links use the CSS class and target based on their underlying Tinderbox link values, if one is specified; the link type value is not picked up as a class name.
Aliases export as discrete notes (if the alias' container is set to ExportChildren) with content of the original but was any contextual hierarchical inks appropriate to the aliases' location. The ^ancestors^ for an alias also export as the ancestors of the alias, not the ancestors of the source note.
Any ancestor set to HTMLDontExport=true is skipped.
Item objects source and destination may be used in expressions to indicate from where data used within the expression's arguments is drawn.
Up: Item-based | |
Previous: ^isDescendedFrom( item )^ | Next: ^beginsWith( target, data )^ |
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]