This version is out of date, covering development from v6.0.0 to v6.6.5. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

TinderboxSix Icon

^linkTo( item [, data] [,css class] )^

Code Type: 

Code Scope of Action: 

Code First Added: 

Code Altered: 

 Creation of Links   [other codes of this type]

 item   [codes with similar scope]



^linkTo( item [, data] [,css class] )^

Exports the data as the anchor text of a link to the web page corresponding to the designated item (or note). The data can be simply some text or another export function's result and may include HTML mark-up code. The data argument is optional, and if not used the name of the destination note is used. The item can be a named note, an item object or a path (e.g. /headlines/latest/).

If included, the css class element causes the HTML link output to include a class="" attribute.

^linkTo()^ exports links from included files relative to the current page.

Example link to "Colophon": ^linkTo(Colophon)^ outputs Colophon

Same but with a 'data' argument: ^linkTo(Colophon,Read the Colophon)^ outputs Read the Colophon

Same but with a 'data' and 'css class' argument: ^linkTo(Colophon,Read the Colophon,xref)^ outputs Read the Colophon

To get the relative URL of a note, use ^url()^.

A Tinderbox Reference File : Export Codes : Export Codes - Full Listing : ^linkTo( item [, data] [,css class] )^