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 <py:if test="thing"> <div class="a"> </py:if> <py:else> <div class="b"> </py:else> Words go here </div> It says that the div tag is closed by the py:if tag Is the Right Way to put my "words go here" into a def and just repeat the div stack? E.g if div function /div /if Or is there another way? On Mon, 14 Aug. 2017, 16:59 Alessandro Molina, <[email protected]> wrote: > I don't recall kajiki having a py:elif statement. It only supports py:if / > py:else. For more complex conditionals py:switch / py:case / py:else should > be used or you have to nest multiple if else conditions to achieve that. > > On Sun, Aug 13, 2017 at 3:13 PM, Craig Small <[email protected]> wrote: > >> I'm converting from Mako to Kajiki and having problems with a >> if,then,else arrangement on my div >> >> >> if w.fullwidth: >> >> <div class="col-md-12"> >> >> %elif w.fillrow: >> >> >> <div class="col-md-8 col-sm-8 col-xs-12"> >> >> %else: >> >> >> <div class="col-md-4 col-sm-4 col-xs-12"> >> >> %endif >> stuff goes here >> </div> >> >> No matter what combination of py:if I try to use I get errors with the >> Kajiki xml engine. It seems to be almost but not quite the same and has a >> huge problem with conditional elements. >> >> - Craig >> >> -- >> 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. >> > -- > 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.

