Purpose
This will make all following confluence tables a specific width
Details
Macro Name | related-content | ||||||||
---|---|---|---|---|---|---|---|---|---|
Macro-Title | Create Page below Parent | ||||||||
Description | This Macro creates a headline and display all pages with the same labels as the Page itself | ||||||||
Categories | Confluence Content | ||||||||
Documentation URL | |||||||||
Definition of User Macro |
| ||||||||
Reference | Modified from http://confluence.atlassian.com/display/DISC/Related+Content |
Macro Code
## @noparams <h2>Relaterede sider eller blogs:</h2> #set($wiki="") #set($globalHelper=$action.getHelper()) #if($content) ## i. e. we render a normal page #set($renderer=$globalHelper.getWikiStyleRenderer()) #set($context=$content.toPageContext()) #set($labelList=$content.getGlobalLabels($action.getRemoteUser())) #if($labelList.size() > 0) #set($labelUtil=$content.getLabelUtil()) #set($labels=$labelUtil.convertToDelimitedString($labelList)) #if($paramlabel) #set($labels=$labels + " " + $paramlabel) #end #if($paramlabels) #set($labels=$labels + " " + $paramlabels) #end #set($wiki="{contentbylabel:labels=$labels") #if($paramauthor) #set($wiki=$wiki + "|author=$paramauthor") #end #if($paramtype) #set($wiki=$wiki + "|type=$paramtype") #end #if($paramshowLabels) #set($wiki=$wiki + "|showLabels=$paramshowLabels") #end #if($paramshowSpace) #set($wiki=$wiki + "|showSpace=$paramshowSpace") #end #if($paramtitle) #set($wiki=$wiki + "|title=$paramtitle") #end #if($parammax) #set($wiki=$wiki + "|max=$parammax") #end #if($parammaxResults) #set($wiki=$wiki + "|max=$parammaxResults") #end #if($paramexcerpt) #set($wiki=$wiki + "|excerpt=$paramexcerpt") #end #if($paramspace) #set($wiki=$wiki + "|space=$paramspace") #end #if($paramspaces) #set($wiki=$wiki + "|space=$paramspaces") #end #if($paramsort) #set($wiki=$wiki + "|sort=$paramsort") #end #if($paramreverse) #set($wiki=$wiki + "|reverse=$paramreverse") #end #set($wiki=$wiki + "}") #end #set($xhtml=$renderer.convertWikiToXHtml($context, $wiki)) #else ## we are e. g. in Global Template Preview #set($xhtml=$globalHelper.renderConfluenceMacro($wiki)) #end ## remove leading <p> and trailing </p> #if($xhtml.startsWith("<p>",0) && $xhtml.endsWith("</p>")) #set($len=$xhtml.length()-$generalUtil.convertToInteger(4)) #set($xhtml=$xhtml.substring(3,$len)) #end ${xhtml}