ozwyzard
2012-06-07 04:45:20 UTC
Hello,
Is there a better way to construct the following without requiring two if
statements for each tab item?
Thanks!
----
<py:def function="sidebar(tabname)">
<div class="sidebar-nav">
<ul class="nav-list">
<li py:if='tabname=="TabOne"' class="active"><a
href="#">TabOne</a></li>
<li py:if='tabname!="TabOne"'><a href="#">TabOne</a></li>
<li py:if='tabname=="TabTwo"' class="active"><a
href="#">TabTwo</a></li>
<li py:if='tabname!="TabTwo"'><a href="#">TabTwo</a></li>
</ul>
</div>
</py:def>
Is there a better way to construct the following without requiring two if
statements for each tab item?
Thanks!
----
<py:def function="sidebar(tabname)">
<div class="sidebar-nav">
<ul class="nav-list">
<li py:if='tabname=="TabOne"' class="active"><a
href="#">TabOne</a></li>
<li py:if='tabname!="TabOne"'><a href="#">TabOne</a></li>
<li py:if='tabname=="TabTwo"' class="active"><a
href="#">TabTwo</a></li>
<li py:if='tabname!="TabTwo"'><a href="#">TabTwo</a></li>
</ul>
</div>
</py:def>
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To view this discussion on the web visit https://groups.google.com/d/msg/genshi/-/VFa6Nv4XZH4J.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.
You received this message because you are subscribed to the Google Groups "Genshi" group.
To view this discussion on the web visit https://groups.google.com/d/msg/genshi/-/VFa6Nv4XZH4J.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to genshi+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/genshi?hl=en.