news
lam_category_popup v0.5 (TXP plugin)
18 December 07
(Generates a popup selector using ‘optgroups’ to divide parent categories and their children)
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 <optgroup> tag and lists each child category underneath them for better organization.

Kinda hard to explain in words so you can see an example of this plugin at work here (the popup selector on the right)
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.
(related categories: cms, plugins, textpattern )
Comment
Nice textpattern plugin! Is there a way to break up the parent categories? So each parent would have a drop down and have the parent label show instead an initial having a blank.
an9el24 // Jan 25, 03:41 AM · #
showcase
recent posts
-
textpattern plugin: lam_addthis v0.4 released
Posted Mar 03, 2010 in: cms, plugins, textpattern
-
symphony theme for textpattern 4.2.0
Posted Sep 21, 2009 in: cms, design, textpattern, themes
- textpattern syntax highlighting with editarea
-
symphony admin theme ported to textpattern
Posted Jun 09, 2009 in: cms, design, misc, textpattern, themes
-
lam_accordion_section updated for TXP 4.08
Posted Jun 06, 2009 in:





