On Fri, 2007-12-01 at 03:42 +0100, Christoph Zwerschke wrote:
> iain duncan wrote:
> > I'm wondering if I can use match templates in kid matching on element
> > IDs instead of tags. It seemed to me from the ElementTree docs that I
> > could do something like:
> > 
> > <div py:match="item.get('ID') == 'id_block_3'">I am the Header!</div>
> > or
> > <div py:match="item.attrib.get('ID') == 'id_block_3'">I am the
> > Header!</div>
> > 
> > But neither worked. Am I limited to matching on a tag, or have I just
> > got something wrong there?
> 
> Since the match is done against your source kid template which is XHTML, 
> you need a lowercase 'id' in the code above instead of 'ID'.
> 
> -- Christoph

Thanks Christoph, that works. Now I like kid even more! =)

Iain


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to