Page 1 of 1

Typing custom properties?

Posted: Wed Dec 10, 2008 12:03 pm
by Mekk
It would be nice if I could make some custom property to be shown as a drop-down setting instead of textfield. Any suggestions what could be the easiest way to implement this?

(my use case: I want to introduce some article classifier - "normal", "short", "wide" - to be used in .tpl and .css to pick different layouts)

Re: Typing custom properties?

Posted: Wed Dec 10, 2008 3:51 pm
by garvinhicking
Hi!

That's hard because it would lead to endlessly long configuration fields in the custom entryproperties plugin. The contactform plugin is a good example for such bad configuration syntax.

The best way is to create your own event plugin listening in backend_entry hook and emitting your dropdowns and store them in th e entryproperties DB table.

Regards,
Garvin