This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox Icon

^url( item )^


Code Type: 

Code Scope of Action: 

Code First Added: 

Code Altered: 

 Creation of Links   [other codes of this type]

 item   [codes with similar scope]

 Already in v5.0.0

 format"


^url( item )^

The relative URL of the exported HTML web page for the item. The URL of an alias to a note is the URL attribute of that note's original. It is effectively ^host^ + ^path^ + ^file(note)^.

Don't confuse this with ^value(URL)^ which will return the content of the note's URL field.

^url(this)^ will return the relative path from the current page to the page the included note creates when it is exported. If the note is not exported, but only appears on included pages, ^url(this)^ is undefined.

As ^url()^ only supplies the 'href' parameter value for an HTML link, if you want to customise your link, e.g. by setting a CSS class parameter, you can do that in the template rather than needing to do so in the TB code itself.

^url(this)^ gives a relative path from the current page to the note; by comparison, ^path(this) gives the path from the top level of the site to the note. Thus:

^url(BorderBevel)^: ../../../Attributes/SystemAttributeList/BorderBevel.html

^path(BorderBevel)^: index/Attributes/SystemAttributeList/BorderBevel.html

^url(this)^: #

^path(this)^: index/ExportCodes/ExportCodeTypes/CreationofLinks/urlitem.html

To make a deliberate 'manual' HTML link to another note see ^linkTo()^.


Possible relevant notes (via "Similar Notes" feature):


A Tinderbox Reference File : Export Codes : Export Code Types : Creation of Links : ^url( item )^