0

I'm setting up a RefineryCMS site, I'd like to have the menu links showing the page full title on hover. In other words, every li element of the menu should be in this form:

<li><a href="/my_page_url" title="my_page_main_title">my_page_menu_title</a></li>

Where "my_page_main_title" is the one the admin enters at the top of the Page form and "my_page_menu_title" is the one in the advanced options.

I figured out I have to override _menu_branch.html.erb, but what should I put after title: ?

<%= link_to(menu_branch.title, refinery.url_for(menu_branch.url), title:  ) -%>

Thank you.

PS: I'm riding refinerycms-core v.2.0.9

Darme
  • 6,984
  • 5
  • 37
  • 52

1 Answers1

1

If you simply want to display the page title as the title attribute and the menu title as the one in the link tag like this:

<a href='/my_page_url' title='Entered Top Of Page Form'>Menu Title</a>

Then you'd have to decorate the model and override the branch like so: https://gist.github.com/parndt/5147926

parndt
  • 1,873
  • 11
  • 13
  • Is not working: I guess menu_branch.page_title is returning nil because there's no sign of the title attribute in the nav items. – Darme Mar 12 '13 at 23:22
  • After I told you which version of Refinery I was using and your consequent update, is now working. – Darme Mar 12 '13 at 23:59