HTML - Provides a superscript code for referring to a reference - link takes the user to Resources tab
General
Spaces Where Used | all SWEHB spaces |
---|---|
How used | provides code for referring to a reference |
Visibility | all users in the Macro Browser |
Title | swerefn |
Description | |
Categories | |
Icon URL | |
Documentation URL | |
Definition | no macro body |
Output Format | |
Status | Active in all spaces |
The code "sweref" worked on old pages, but no longer works after SWEHBVB. The new "swerefn" must be used since it contains fixed code.
Rendering
The macro displays a superscripted number that is the sweref number for the reference. All references are sequentially numbered and each reference is a page in the References database in 7150\References Table.
Current Code - sweref
#set($xml="{get-data:reftab}")
#set($xhtml=$action.helper.renderConfluenceMacro($xml))
#set($len=$xhtml.length()-$generalUtil.convertToInteger(4))
#set($xhtml=$xhtml.substring(3,$len))
#if($xhtml.length()>0) #set($reftabnum=$xhtml) #else #set($reftabnum="5") #end <sup><a href="#_tabs-$reftabnum" onclick="scrollTo(0,0)">$param0</a></sup>
Current Code - swerefn
## @param refnum:title=SWE Reference Number (SWEREF #)|type=int|default=|desc=type in the SWE reference number that you wish to be displayed where you are inserting this macro
#if($param0) #set($swerefnumber=$param0) #else #set($swerefnumber=$paramrefnum) #end
#if(!($swerefnumber)) #set($swerefnumber="ERR") #end
#set($xml="{get-data:reftab}")
#set($xhtml=$action.helper.renderConfluenceMacro($xml))
#set($len=$xhtml.length()-$generalUtil.convertToInteger(4))
#set($xhtml=$xhtml.substring(3,$len))
#if($xhtml.length()>0) #set($reftabnum=$xhtml) #else #set($reftabnum="5") #end <sup><a href="#_tabs-$reftabnum" onclick="scrollTo(0,0)">$swerefnumber</a></sup>