section_list
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:
<txp:section_list>
...contained statements...
</txp:section_list>
Related: if_first_section, if_last_section
attributes
sections="all sections"
exclude="unset"
include_default="0" (boolean)
sort="name asc"
form="unset"
default_title="Site Name"
active_class="unset"
presentation
label="unset"
labeltag="unset"
break="br"
wraptag="unset"
class="section_list"
genealogy
Version 4.0.7
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" />
</li>
</txp:section_list>