On Mon, Aug 14, 2017 at 9:25 AM, Craig Small <[email protected]> wrote:
> I was trying to make the class of the div dependent on two variables.
>
> X = class a
> Not X and y = class b
> Not X and not y = class C
>
> The problem is you cannot have a conditional open tag and the close
> elsewhere. Eg
>
Yep, absolutely, that's the whole idea behind Kajiki and Genshi, the whole
thing must be valid xml so that it can never generate an invalid document
as the result.
> <py:if test="thing">
> <div class="a">
> </py:if>
> <py:else>
> <div class="b">
> </py:else>
> Words go here
> </div>
>
Use py:attrs or just "class=${a if thing else b}" ?
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.