On Oct 27, 2009, at 1:12 PM, beachbc wrote:
>
> For modified navigation making the current "page" look current.
>
> <def tag="main-nav">
> <navigation merge-attrs class="main-nav" param="default">
> <% currentpage = request.path_parameters['id'].upcase %>
> <repeat with="&get_nav">
> <% unless currentpage.include? this.name.upcase.gsub(' ','-') %>
> <nav-item merge-attrs param="default"><name /></nav-item>
> <% else %>
> <nav-item merge-attrs class="current" param="default"><name /></
> nav-item>
> <% end %>
> </repeat>
> </navigation>
> </def>
>
> &getnav returns a collection of pages.
>
> Should i change the rhtml parts to dryml or does it matter?
The ERB parts are fine, there's no hard rule on where they can be
used. It's mostly just a style thing.
Note that the repeated uses of param="default" may be an issue; I'm
not sure if it works, and if it does it won't do what you expect.
--Matt Jones
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---