Page 1 of 1

How to add anchor tag to menu [SOLVED]

Posted: Tue Mar 18, 2014 1:44 pm
by becfret
Hi,

I'm trying to add an anchor tag to the menu so that when someone clicks on 'Contact Us' in the navigation they are taken to the bottom of the page where all the contact details are. My attempts so far have either done nothing, caused a 404 error or have linked to the home page - am stumped!

Thanks for your help,

Becky

Re: How to add anchor tag to menu

Posted: Tue Mar 18, 2014 4:31 pm
by JohnnyB
Are you using the menu manager?
There are few ways to do this....
1) look under the Extensions and then Tags in the Admin for 'Anchor'
{anchor anchor='here' text='Scroll Down'}

2) you can use a Smarty tag:
<a href="{$smarty.get.page}#anchor">Anchor</a>

3) I believe the CGSimpleSmarty and/or CGExtensions modules has an anchor tag or a way to create an anchor from one of the tools it provides.

4) menu manager:
Where the <a> link is:
{$node->alias}#anchor

Re: How to add anchor tag to menu

Posted: Tue Mar 18, 2014 5:27 pm
by becfret
I added <li>{anchor anchor='anchor' text='Contact'}</li> to menu manager and it's working perfectly.

Thank you so much :)

Becky