<txp:section_list /> sing/cont tag, 7 attributes


The section_list tag is a single or a container tag which is used to produce a list of linked sections. When used as a container tag, it is used as an opening and closing pair, like this:

...contained statements...

Related: if_first_section, if_last_section


sections="all sections" 
  • Comma-separated list of section names to include in the list, displayed in specified order (unless overridden by the sort attribute).
  • Comma-separated list of section names to exclude from the list. Sections takes precedence over exclude.
include_default="0" (boolean) 
  • Whether to include “default” section in section list.
sort="name asc" 
  • Values
    • name
    • page
    • css
    • is_default
    • in_rss
    • on_frontpage
    • searchable
    • title
    • rand() (random)
  • Direction
    • asc (ascending)
    • desc (descending)
  • Use the specified form to process each included section.
default_title="Site Name" 
  • Text used as a title for the “default” section when include_default is set to 1.
  • (X)HTML class attribute to be applied to the “active” or current link in a list.
  • Only works in the single tag without the form attribute.


  • Label prepended to item (or as first list item, where appropriate).
  • if wraptag is available and is set to ol or ul, the label will be the first list item.
  • (X)HTML tag (without brackets) to wrap around label.
  • (X)HTML tag (without brackets) or string to separate list items.
  • (X)HTML tag (without brackets) to wrap around the list.
  • (X)HTML class attribute to apply to the wraptag.


Version 4.0.7

  • Can be used as a container tag.
  • form attribute added.
<txp:section_list /> 3 examples

Display a linked section list

Adding the label “Sections” and wrapping the output in a paragraph with each section on its own line:

<txp:section_list label="Sections" wraptag="p" break="br" />

Display a styled section list

<txp:section_list break="li" wraptag="ul" /> 

Styles could go this way

.section_list {
list-style-type: none;

Set active class using the container tag

This code will add class=“active” to the <li> element around the “current” section in the list.

<txp:section_list wraptag="ul" break="">
<li<txp:if_section name='<txp:section />'> class="active"</txp:if_section>>
<txp:section title="1" link="1" />