[Petal] Mdifiers to create attributes and custom field types?

Justin W petal at datademons.com
Mon Oct 12 17:43:56 GMT 2009


I'm wondering if either of two things are possible in Petal.

1) A modifier that can create a series of element attributes.  Ideally,
something like:

<tag tal:attributes='modifier --${some/hashref}' />

Wherein modifier would return a data structure/string/something that would
allow it to make lots of attributes on tag.

And,

2) Is it possible to write a modifier that can inject a tag type?  I don't even
know how I would write this to give an example, but I'd like to be able to
dynamically generate the tag name itself based on output from a subtourine/data
structure/whatever.

Sometimes I'll want a <div, sometimes, I'll want a <span, sometimes, I might
want a <ul, who knows.

Thanks,
Justin



More information about the Petal mailing list