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 : ^outboundWebLinks( [start, list-item-prefix, list-item-suffix, end, type] )^ | aTbRef Site Map |
^outboundWebLinks( [start, list-item-prefix, list-item-suffix, end, type] )^ |
Code Type: | Link Creation |
Code Scope of Action: | item |
^outboundWebLinks( [start, list-item-prefix, list-item-suffix, end, type] )^
returns an unordered list, of all the web (i.e. external) links from the current note.
The optional parameters allow you to format the group of links as an HTML list or table in the exact format you want, where start is 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. The type parameter restricts the scope of link inclusion and is discussed separately below.
If start, list-item-prefix, list-item-suffix, end are omitted then the default values of <ul>, <li>, </li>, </ul> are used. type my be omitted but if you do wish to use it, the preceding 4 parameters must all be specified.
The optional fifth argument, type, lets you restrict exported lists to specific link types, as in the named types seen in the TBX's Link Types palette. For example:
^outboundWebLinks(<ul>,<li>,</li>,</ul>,example)^
will list only inbound links of type "example". As the type argument is a regular expression, besides specifying a particular link type name, you can specify wildcard characters or lists of eligible link types, etc.
^outboundWebLinks(<ul>,<li>,</li>,</ul>,(example|untitled))^
will list links of the types untitled and example.
Also see ^outboundBasicLinks^, ^outboundTextLinks^. for self evident reasons there is no inbound equivalent of this code.
This code exports CSS class and target based on their underlying Tinderbox link values - assuming these are actually completed; the link type value is not picked up as a class name.
New item objects source and destination may be used to indicate from where data used within the arguments is drawn.
Up: Item-based | |
Previous: ^outboundTextLinks( [start, list-item-prefix, list-item-suffix, end, type] )^ | Next: ^paragraphs( [item,] N )^ |
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]