Hello my name is Steve Lam and this is my portfolio. I’m a freelance web designer based in Toronto, ON Canada. I love cats, playing music, valid css/xhtml and generally all things music and design related. My aim is to work with indie artists, musicians and small businesses in achieving frenetic designs while adhering to today’s web standards.

For those who are curious, as an open-source advocate my favourite content management system (cms) is Textpattern!

That’s it. Feel free to contact me for a quote, creative brief, whatever.

who?

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”

label=“label text”

wraptag=“wraptag text”

section=“section_name”

this_section=int

parentsort=“asc or desc”

childsort=“asc or desc”

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.

Bookmark and Share

(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 · #

  • You may use Textile to style your comments.