[solved] How to add text below main nav item

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
8bits
Forum Members
Forum Members
Posts: 11
Joined: Tue Apr 01, 2008 7:54 am

[solved] How to add text below main nav item

Post by 8bits »

I'm having a problem adding unique content to a navigation/menu item within a Menu Manager template.

What I'm trying to do is add a 2 or 3 word description under the main navigation text for each menu item. For example: 'About' is the main nav text and underneath it says 'About this company'. I want to create a field where the CMS admin can add the phrase 'About this company' to the page and have it appear under the main nav text.

I've tried using one of the 'Extra Page Attributes' but this hasn't worked. It just adds the 'Extra Page Attribute' for the page you are on to every nav item. I'm sure there is a simple way to get this to work, but my PHP knowledge isn't enough to know it!

Can anyone tell me the best way of accomplishing this?

Thanks,

Nick.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: How to add text below main nav item

Post by Jos »

You need to make the change in the MenuManager.

If you currently use a menu with extension .tpl, you first need to hit the button: "Import Template to Database".

Now you can edit the template by adding the smarty tag {$node->extra1}
Note that you must add it multiple times, depending on the number of variations a menu-item can be displayed.
User avatar
8bits
Forum Members
Forum Members
Posts: 11
Joined: Tue Apr 01, 2008 7:54 am

Re: How to add text below main nav item

Post by 8bits »

Thanks Jos, much appreciated. That did the trick!

I almost had it, but the 'extra1' syntax is what got it working for me (didn't know how to pull the 'Extra Page Attribute' field into the template.)

Regards,

Nick.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: How to add text below main nav item

Post by Jos »

Tip for next time: check the module help ;)
Post Reply

Return to “Modules/Add-Ons”