Hello,
I do not know where else to put this question, so I hope this is the right place.
I am using the Section Header option for holding the place in my menu for submenu pages.
What I typically have seen on website with this sort of function is that it provides a "#" link for the page, so if someone clicks it when they are on any page, it doesn't take them anywhere.
I have noticed on CMSMS that this works when you are on the home page as the link comes up as mysite.com/#. However, when I am on another page, lets say "contact", the link will still be mysite.com/# and not mysite.com/contact/#. So it will take someone to the home page instead of making them sit on the contact page.
Am I missing something here? Please note that I am using pretty URLs on the site so I am not sure if this has an effect.
Thanks.
SOLVED Section Header link?
SOLVED Section Header link?
Last edited by CMSmonkey on Sat Dec 21, 2013 5:35 am, edited 1 time in total.
Re: Section Header link?
I think this is caused by the <base> tag which automatically comes with the {metadata} tag (but that has an option to disable it).
IIRC I sometimes just make the section headers have an <a> tag without href attribute. However, could be that ipad's (maybe other browsers too) don't like that and prevent the hover event. You should test that.
IIRC I sometimes just make the section headers have an <a> tag without href attribute. However, could be that ipad's (maybe other browsers too) don't like that and prevent the hover event. You should test that.
Re: Section Header link?
Gotcha. Thanks for the suggestion Velden. I tried that out and it seemed to work on various mobile browsers, ipad, and desktop browsers except for an Android on Opera browser.
So I tried this and it seems to keep you on the page:
There might be a better way to do it but at least it works for now.
If anyone has any other suggestions please let me know. Otherwise I'll consider this SOLVED.
Thanks.
So I tried this and it seems to keep you on the page:
Code: Select all
<a href="{$smarty.server.REQUEST_URI}/#"><span>{$node->menutext}</span></a>
If anyone has any other suggestions please let me know. Otherwise I'll consider this SOLVED.
Thanks.
Re: SOLVED Section Header link?
I would make a custom menu template that checks for sectionheaders and remove any reference to 'a' links, so no href= etc...