Tinderbox v9 Icon

^root^


Code Type: 

Code Scope of Action: 

Code First Added: 

Code Altered: 

 Export Mark-up   [other codes of this type]

 document   [codes with similar scope]

 Baseline

 format"


^root^

Returns the relative path from the current notes's exported file to the directory that contains the cover page. The relative paths generated will still work during internal preview (i.e. without any export being generated).

When concatenating ^root^ with a path, do not add a trailing (folder) slash as this is created as part of the ^root^ output. Thus use:

^root^images/icon.gif 

…and not…

^root^/images/icon.gif WRONG!

Note that this is not necessarily the same as ^root(this)^, used in the case where a note (this) is embedded inside another note that is included in a page.

The ^root^ of this file's source note is: ../../../ (see your web browser's URL bar to see how this resolves in overall URL terms.).

For additional finer control of relative path calculation, consider use of ^setRoot()^.