Skip to end of metadata
Go to start of metadata

Generates a nested list of Confluence web-sections. Uses Confluence menu sections so that menus are automatically updated with new or deprecated menu items. Atlassian HTML Ids and CSS classes are retained for consistent styling.

See Web Ui - Web Sections for a list of Confluence web sections and their location keys.

Categories: development

Storage Format

<ac:macro ac:name="web-section">
    <ac:parameter ac:name="parameter">value</ac:parameter>                
</ac:macro>

Wiki Markup

{web-section:parameter=value}

Parameter

Name

Description

Type

Default

Required

location

Location

The location or section that should be displayed, leave blank to show all known locations

string

 

(error)

icons

Show Icons

Display the web item icon

boolean

true

(error)

name

Show Name

Display the web item name

boolean

true

(error)

description

Show Description

Display the web item description

boolean

false

(error)(error)

bundled

Show bundled links

Output links that originate in bundled plugins

boolean

false

(error)

force

Force links to be displayed

Ignore conditions and force all links to be displayed

boolean

false

(error)

showKey

Show Key

Display the web item section & key

boolean

false

(error)

divider

Divider

The divider between name/description/key

string

 

(error)

class

CSS Class

A css classname to apply to the lists

string

 

(error)

itemclass

Item CSS Class

A css classname to apply add to the list items

string

 

(error)

id

HTML ID

The html id to apply to the outer list

string

 

(error)

flag

Flag

A list of flags, one of which must be defined for the content to be displayed

string

 

(error)

notflag

Not Flag

A list of flags which must not be defined for the content to be displayed

string

 

(error)

 

To display the web-section menu for:

  • Space Advanced sidebar menu
  • Show link names (e.g. Space Details)
  • Force web items to display out of context
  • Add the class 'myclass' to the top level UL

 

<ac:macro ac:name="web-section">
    <ac:parameter ac:name="section">system.space.advanced</ac:parameter>                
    <ac:parameter ac:name="name">true</ac:parameter>                
    <ac:parameter ac:name="force">true</ac:parameter> 
    <ac:parameter ac:name="class">myclass</ac:parameter> 
</ac:macro>
{web-section:section=system.space.advanced|name=true|force=true|class=myclass}

 

 

HTML Output

<ul class="location location-system-space-advanced myclass">
   <li class="section section-system-space-advanced advanced">Advanced
      <ul class="items">
         <li class="item item-system-space-advanced advanced spacedetails">
            <img src="/confluence/images/icons/contenttypes/space_16.png"><a class="" href=
            "/confluence/spaces/viewspacesummary.action?key=AD">Space Details</a>
         </li>
...
      </ul>
   </li>
   <li class="section section-system-space-advanced exportsection">Export
      <ul class="items">
         <li class="item item-system-space-advanced exportsection betterpdf">
            <img src="/confluence/images/icons/exp_16.gif"><a class="" href=
            "/confluence/spaces/flyingpdf/flyingpdf.action?key=AD">PDF Export</a>
         </li>
...
      </ul>
   </li>
   <li class="section section-system-space-advanced subscribesection">Subscribe
      <ul class="items">
         <li class="item item-system-space-advanced subscribesection rss">
            <img src="/confluence/images/icons/feed-icon-16x16.png"><a class="" href=
            "/confluence/spaces/listrssfeeds.action?key=AD">RSS Feeds</a>
         </li>
...
      </ul>
   </li>
</ul>

 

To display the web-section menu for:

  • Space Advanced sidebar menu
  • Do not show icons
  • Show link names (e.g. Space Details)
  • Show all links from each section
  • Show the web-location and web-item keys
  • Add ' | ' between the name and location keys
  • Only show when flag 'with-sidebar' is set
  • Do not show if flag 'login' is set
  • Force web items to display out of context
  • Add the class 'myclass' to the top level UL
  • Add the class 'myitemclass' to each web-item LI
  • Add the Id 'myid' to the top level UL

 

<ac:macro ac:name="web-section">
    <ac:parameter ac:name="section">system.space.advanced</ac:parameter>   
    <ac:parameter ac:name="icons">false</ac:parameter>                
    <ac:parameter ac:name="name">true</ac:parameter>                
    <ac:parameter ac:name="bundled">true</ac:parameter>  
    <ac:parameter ac:name="showKey">true</ac:parameter> 
    <ac:parameter ac:name="divider"> | </ac:parameter> 
    <ac:parameter ac:name="flag">with-sidebar</ac:parameter>     
    <ac:parameter ac:name="notflag">login</ac:parameter>
    <ac:parameter ac:name="force">true</ac:parameter>
    <ac:parameter ac:name="class">myclass</ac:parameter> 
    <ac:parameter ac:name="itemclass">myitemclass</ac:parameter> 
    <ac:parameter ac:name="id">myid</ac:parameter>
</ac:macro>

 

Result

HTML Output

<ul class="location location-system-space-advanced myclass">
   <li class="section section-system-space-advanced advanced">Advanced | system.space.advanced/advanced
      <ul class="items">
         <li class="item item-system-space-advanced advanced spacedetails myitemclass">
            <a class="" href="/confluence/spaces/viewspacesummary.action?key=AD">Space Details</a> <span class="key">|
            system.space.advanced/advanced:spacedetails</span>
         </li>
...
      </ul>
   </li>
   <li class="section section-system-space-advanced exportsection">Export | system.space.advanced/exportsection
      <ul class="items">
         <li class="item item-system-space-advanced exportsection betterpdf myitemclass">
            <a class="" href="/confluence/spaces/flyingpdf/flyingpdf.action?key=AD">PDF Export</a> <span class="key">|
            system.space.advanced/exportsection:betterpdf</span>
         </li>
...
      </ul>
   </li>
   <li class="section section-system-space-advanced subscribesection">Subscribe |
   system.space.advanced/subscribesection
      <ul class="items">
         <li class="item item-system-space-advanced subscribesection rss myitemclass">
            <a class="" href="/confluence/spaces/listrssfeeds.action?key=AD">RSS Feeds</a> <span class="key">|
            system.space.advanced/subscribesection:rss</span>
         </li>
...     
      </ul>
   </li>
</ul>

 

Web Ui - Web Sections