bannerd

HTML - Provides a superscript code for referring to a reference - link takes the user to Resources tab

General

Spaces Where Usedall SWEHB spaces
How usedprovides code for referring to a reference
Visibilityall users in the Macro Browser
Titleswerefn
Description
Categories
Icon URL
Documentation URL
Definition no macro body
Output Format
StatusActive 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>


  • No labels