^setRoot( [newRoot] )^

Tinderbox Icon

^setRoot( [newRoot] )^

The ^root^ code normally exports the relative path from a note to the top level of the Tinderbox document. This is valuable for defining relative paths, especially in macros.

In some cases, though, you may want a relative path in one page (an HTML page, say) and an absolute link in another (an RSS feed, where relative links may be forbidden).

The v4.0.0 export element

^setRoot(newRoot)^

tells Tinderbox to use its first argument (newRoot) as the value of ^root^ until either

To restore relative URLs, use ^setRoot()^ with no arguments.

For example:

^setRoot(http://example.com/)^


Up: Export Mark-up
Previous: ^sectionCloud( [item, count] )^  Next: ^uppercase( data )^ 

[Last updated: 3 Dec 2008]

Google search aTbRef for:  

Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]

Creative Commons License

Made with Tinderbox