Templates

How can I get an "All Categories" link?

Scenario:
"I want to have an "All Categories" link in my list of categories."

Solution:
Add a little piece of code in your template.

Original forum thread:
http://forum.nucleuscms.org/viewtopic.php?t=8575

Method:
The Category links are defined in your template. Go to your Admin area, scroll down to Layout and click on Templates. It will take you to a page that lists all your templates. Click on the template you're currently using and scroll down to the box labelled "Category Lists".

In Category header, put this code:

<ul>
<li><a href="<%blogurl%>" title="All categories">All</a></li>

In Category body, put this code:

<li><a href="<%catlink%>" title="Category: <%catname%>"><%catname%></a></li>

In Category footer, put this code:

</ul>

This will generate your list of categories, with the "All" link at the top.

section: Templates | submitted by Leng on 2005.Sep.10 | 5113 views

item rate
Total votes: 5 - Rating: 8.40

Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

10