Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top