How do I link to sections?
How do I link to categories?
How do I link to static pages?
How do I make a menu of section links?


Sections are usually the topmost navigation elements of your web site (more on site structure here). If you want a simple, automatic list of links to sections, use the section_list tag:

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

This puts the links in an unordered list, so you can use CSS to alter the layout as required (see A List Apart for some examples).

For a popup selection list, use the popup tag:

<txp:popup type="s" />

If you want more control over the content of the list (to omit certain sections, or use a specific order), the best way is with the <txp:section /> tag (requires Textpattern 4.0.2+):

<txp:section wraptag="li" link=1 title=1 name="about" />
<txp:section wraptag="li" link=1 title=1 name="articles" />
<txp:section wraptag="li" link=1 title=1 name="news" />
<txp:section wraptag="li" link=1 title=1 name="contact" />

If you’ve created static pages, like an about or contact page, you can link to them by linking to the associated section:

<txp:section link=1 title=1 name="about" />
<txp:section link=1 title=1 name="contact" />

Category links are specified in a similar way. There’s a category_list tag:

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

The popup tag can also be used for categories:

<txp:popup type="c" />

Please note however that categories are independent of sections. Both of these tags will link to a list of articles in all sections that belong to the selected category.

For more control, you can use the category tag (also requires Textpattern 4.0.2+):

<txp:category wraptag="li" link=1 title=1 name="products" />
<txp:category wraptag="li" link=1 title=1 name="weather" />
<txp:category wraptag="li" link=1 title=1 name="photos" />