Menu - Web Section

This macro generates a nested list of Confluence Web Sections. It automatically uses Confluence Menu Sections to update menus 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.

Usage

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


icons

Show Icons

Display the Web Item icon

boolean

true

name

Show Name

Display the Web Item name

boolean

true

description

Show Description

Display the Web Item description

boolean

false

bundled

Show bundled links

Output links that originate in bundled plugins

boolean

false

force

Force links to be displayed

Ignore conditions and force all links to be displayed

boolean

false

showKey

Show Key

Display the Web Item section and key

boolean

false

divider

Divider

The divider between name/description/key

string


class

CSS Class

A CSS classname to apply to the lists

string


itemclass

Item CSS Class

A CSS classname to apply to add to the list items

string


id

HTML ID

The HTML ID to apply to the outer list

string


flag

Flag

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

string


notflag

Not Flag

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

string


Basic Example

To display the Web Section menu for a 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}

Result

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>

Advanced Example

To display the web-section menu for a 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>
On this page