Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Current version:
0.1
About It:
Get it:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

zoo_section_and_category_list

This plugin tries to accomplish the following:

  • Building a 2-Level Navigation-Menue using a single TXP-tag.
  • 1st Level should consist of sections, 2nd level of categories
  • Keep the 2nd level adaptable, meaning it’s contents should be controllable from users without access to and knowledge of the “Presentation”-Tab in the Admin-Interface. This means by simply adding a article-category and publishing at least one article in it a user can add a “Page” to the Website.

So –

Here it is – my first plugin: zoo_section_and_category_list

Here’s an idea how it looks: zoo_section_and_category_list in Action

Here’s the related thread which startet it all: Adaptable 2-Level Navigation-Menu with Highlighting (thanks to ruud for all comments and pointing me to helpful information)

Please feel free to comment and also criticize .. maybe over at it’s thread in the Textpattern-forum cheers, arnski

And finally here’s the included help:

The TXP- Tag:

<txp:zoo_section_list>

Parameters

Same as section_list but with a few more:

  • showall : Can be set to either 0 or 1. With this set to 1 the 2nd Level (categories) is always shown. 0 shows 2nd Level for active section only.
  • cat_active_class : Put in css-class for the active category-link
  • cat_class : Put in css-class for the inactive category-links

Example Usage:

Assuming you have four Sections – “Companyportrait,Products,Partner,Products” and have published several Articles in the section “Products” – each in one of the Categories “Concept,Productcategory1 and Productcategory2”.
The following tag

<txp:zoo_section_list wraptag="span" active_class="menue_links_on" class="menue_links_off" cat_class="cat_links_off small" cat_active_class="cat_links_on small" include_default="0" showall="0" sections="Companyportrait,Products,Partner,Contact" />

produces:

<span class="menue_links_off"> <a href="http://dev.test.com/Companyportrait/">Companyportrait</a><br /> <a class="menue_links_on" href="http://dev.test.com/Products/">Products</a><br /> <a class="cat_links_off small" href="http://dev.test.com/Products/?c=Concept">Concept</a><br /> <a class="cat_links_on small" href="http://dev.test.com/Products/?c=Productcategory1">Productcategory1</a><br /> <a class="cat_links_off small" href="http://dev.test.com/Products/?c=Productcategory2">Productcategory2</a><br /> <a href="http://dev.test.com/Partner/">Partner</a><br /> <a href="http://dev.test.com/Contact/">Contact</a> </span>

Example CSS:

.menue_links_off, .cat_links_off{
text-decoration: none;
color: #000;
border: none;}
.menue_links_on, .cat_links_on{
text-decoration: none;
color: #A80017;
border: none;}

Article Request Count:
Keywords/tags:
Initially released:
2007.08.23
Posted here:
23 Aug 2007

You know you want to visit the Archives.
Published with Textpattern