Hi, What do you think about this web helper function ?
:: def tag_class(values): values = [v for v in values if v != None] if values: return 'class="%s"' % " ".join(values) return '' Example of use in mako template : :: <tr> % for i, column in enumerate(c.columns): <th ${h.tag_class(("firstcolumn" if i == 0 else None, "asc" if request.GET.get("o") == "asc" else None))}>${column.name}</th> % endfor </tr> Thanks for your comment. Regards, Stephane --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en -~----------~----~----~----~------~----~------~--~---