Robert Posted May 4, 2014 Share Posted May 4, 2014 To create an alphabetical category list, simply follow the procedure below: 1. Create a New Page in your TGPX Admin and give it an appropriate name, like Categories. 2. Go to Edit Templates and place the following in your new page template: {categories var=$categories order=name startswith=A} {foreach var=$category from=$categories counter=$counter} <li><a href="/path/to/{$category.name|htmlspecialchars|strtolower|treplace_special::''}/">{$category.name|htmlspecialchars}</a> <small>{if $category.used == 0}(0){else}({$category.used|htmlspecialchars}){/if}</small></li> {/foreach} This will create a bulleted list of categories, starting with the letter "A", and include a link to that category. It will also give you a list of how many galleries are in that category. 3. Repeat this for each category letter you want to add. Thus, if you wanted all 26 letters, you would simply repeat the code above 26 times, and just need to change the variable on the first line where it says "startswith=A" (change A to B or to C or whatever letter you like). Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now