Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
0.5
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!

lam_category_popup

lam_category_popup v0.5 download here

idea derived from this thread

basically the same thing as <txp:popup /> except it wraps each parent category in an unselectable tag and lists each child category underneath them for better organization. (in other words, don’t assign any articles to a parent directory if you want to use this plugin, as they would not be selectable!)

kinda hard to explain in words so you can see an example of this plugin at work here (the popup selector on the right)

Changelog:

v0.5 – saved a query for each parent category called
v0.4 – cleaned up some undefined variables (thanks mattmikulla)
v0.3 – using getTree function instead of my own blubbery (thanks bloke)
v0.2 – woops forgot custom prefixes for tables
v0.1 – initial release

Tag:

<txp:lam_category_popup />

Attributes:

Uses all the same attributes as <txp:popup /> (except “type” since theres no parent/child relationship for sections yet)

categories=“categories separated by commas”

  • Choose parent categories to include in popup list.
  • If left blank, ALL parent categories (including empty ones) will show up!

label=“label text”

  • Label for the top of the list.

wraptag=“wraptag text”

  • Character to be used as the wraptag.
  • Default is div

section=“section_name”

  • Jump to the selected category for the named section.
  • Default is empty.

this_section=int

  • Jump to the selected category for the currently active section. Available values: 1 (yes) or 0 (no).
  • Default is 0.

parentsort=“asc or desc”

  • Sorts parent categories.
  • Default is asc

childsort=“asc or desc”

  • Sorts child categories.
  • Default is asc

Example Tag:

<txp:lam_category_popup label="browse" categories="fish, vegetables" parentsort="desc" /> would produce a popup list akin to the following:

browse

Vegetables

  • Cauliflower
  • Potatos
  • Tomatos

Fish

  • Cod
  • Haddock
  • Monkfish

Credits

Thanks to masa and mattmikulla for the idea. I currently don’t have a use for this plugin myself but I figured I’d give back to the community.

Article Request Count:
Keywords/tags:
Posted here:
26 Dec 2007
Article modified:
17 May 2009

If there is a comment form at the Information URL, you may want to leave your comments/questions there or at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (4)

Aaargh! This plugin looks perfect for my needs, but the url isn’t working. Anyone got a copy of it?

I discovered out from Google’s cache that you can download it from here.

sorry my page went down for a while. its still in a bit of a shamble but the link should work now at least.

no idea if the plugin still works with the latest version of TXP though. i’ve stopped developing plugins for it quite a while ago.

Yiiiepey! Thanks alot Petri! And Steve: Regards to your efforts, I completely understand and am truly grateful for the work you’ve put in!

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern