on the navigation taglib page, it shows an attribute current which it
uses to apply styling to the nav-item that is currently applicable.
http://cookbook.hobocentral.net/api_tag_defs/navigation

I believe, the default main-nav does this based off the controller but
you have to replicate it if you override main-nav.  I haven't bothered
with this personally though so I can't say for sure this is your
issue.

On Apr 27, 8:11 am, Jonathan Hogue <[email protected]> wrote:
> Any takers? I don't think the answer is out there already. I've spent
> hours searching. I don't think it's that difficult either.
>
>
>
> On Sun, Apr 25, 2010 at 12:31 PM, jonhogue <[email protected]> wrote:
> > Newb alert.
>
> > I have a class called Work Orders.
>
> > In my controller, I have functions like this to give a me a subset of
> > work orders.
>
> >  def needs_bid
> >   �...@work_orders = WorkOrder.needs_bid()
> >    hobo_index @work_orders
> >    render :index
> >  end
>
> > In my application.dryml, I have this.
>
> > <def tag="main-nav">
> >  <navigation class="main-nav" merge-attrs param="default">
> >      <nav-item href="#{base_url}/">Home</nav-item>
> >      <if test="&current_user.administrator?">
> >        <nav-item with="&WorkOrder"><ht
> > key="work_orders.nav_item">Work Orders</ht></nav-item>
> >        <nav-item href="#{base_url}/">Billing</nav-item>
> >      </if>
> >  </navigation>
> > </def>
>
> > In my Work Orders link, when I change the label to something like
> > "Open Work", it no longer marks that menu item as the current menu
> > item.
>
> > Question #1, How do I change the label for that link and still have
> > the current functionality work.
>
> > I wanted to add a sub-menu for my specific categorizations of Work
> > Orders, so I added this to my view/work_orders/index.dryml
>
> >    <top-page-nav: replace>
> >        <navigation class="top-page-nav">
> >          <nav-item action="new" to="&model">*New*</nav-item>
> >          <nav-item action="index" to="&model">All Unfinished</nav-
> > item>
> >          <nav-item href="/work_orders/index/needs_bid">Needs Bid</nav-
> > item>
> >          <nav-item href="/work_orders/index/needs_work">Needs Work</
> > nav-item>
> >          <nav-item href="/work_orders/index/needs_paper_work">Needs
> > Paper Work</nav-item>
> >        </navigation>
> >    </top-page-nav:>
>
> > This works great, but again, current doesn't work.
>
> > Question #2
> > What is a clean way to make current work for sub menus?
>
> > --
> > 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 
> > athttp://groups.google.com/group/hobousers?hl=en.
>
> --
> 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 
> athttp://groups.google.com/group/hobousers?hl=en.

-- 
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.

Reply via email to