Thanks for that, it fixed that component of the templates. Unfortunately, I'll probably have to go back to Mako because it requires some very strict requirements of the templates. I haven't worked out why, but I get duplicate icons in my lists. Also things like <div class="clearfix" /> do some very strange things.
The killer is, Mako lets me template javascript, I just couldn't get Kajiki to handle it properly. - Craig On Tue, 15 Aug 2017 at 00:05 Alessandro Molina <[email protected]> wrote: > 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. > -- Craig Small https://dropbear.xyz/ csmall at : enc.com.au Debian GNU/Linux https://www.debian.org/ csmall at : debian.org Mastodon: @[email protected] Twitter: @smallsees GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5 -- 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.

