[Jifty-commit] r624 - in jifty/trunk: share/web/templates/_elements
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Feb 24 21:14:06 EST 2006
Author: trs
Date: Fri Feb 24 21:14:05 2006
New Revision: 624
Modified:
jifty/trunk/ (props changed)
jifty/trunk/share/web/templates/_elements/menu
Log:
r8764 at wintermute: tom | 2006-02-24 21:12:27 -0500
Make the menu elements not have extra whitespace around them, which many times is important when CSSifying a list. (Is there a better way to do this?)
Modified: jifty/trunk/share/web/templates/_elements/menu
==============================================================================
--- jifty/trunk/share/web/templates/_elements/menu (original)
+++ jifty/trunk/share/web/templates/_elements/menu Fri Feb 24 21:14:05 2006
@@ -17,16 +17,19 @@
<%args>
$item
</%args>
- <li <% $item->active ? 'class="active"' : '' |n %>><%
+ <%init>
+ my @kids = $item->children;
+ </%init>
+ <li <% $item->active ? 'class="active"' : '' |n %>><%
Jifty->web->link(
url => $item->url,
label => $item->label,
- ) %>
-% if (my @kids = $item->children) {
+ ) %><% @kids ? '' : '</li>' |n %>
+% if (@kids) {
<ul class="submenu">
% $m->comp(".menu", item => $_) for @kids;
</ul>
-% }
</li>
+% }
</%def>
More information about the Jifty-commit
mailing list