Page 1 of 1

cant get anchor to work on generated pages i.e news detail

Posted: Mon Nov 25, 2013 4:45 am
by papergirl85
Hi there,

I've created a top of page anchor

with the code {anchor anchor='top' text='' onlyhref='true'}

it works fine for normal pages, it goes to the top,

but on the news detail page, it just goes back to the news summery page and not to the top of the page, it seems the link misses the extra text on the end of the link.

how do I get this to work?

Re: cant get anchor to work on generated pages i.e news deta

Posted: Wed Nov 27, 2013 2:35 am
by papergirl85
is there a setting that doesnt allow the accessibility links to be shown?

the demo shows

<ul class="accessibility">
<li><a href="/cmsmadesimple/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=1&cntnt01origid=39&cntnt01returnid=39#menu_vert" title="Skip to navigation" accesskey="n">Skip to navigation</a></li>
<li><a href="/cmsmadesimple/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=1&cntnt01origid=39&cntnt01returnid=39#main" title="Skip to content" accesskey="s">Skip to content</a></li>
</ul>


but mine doesnt show the full url

it shows


<link rel="start" title="Home Page, shortcut key=1" href="http://www.url.com/test/" />
<link rel="prev" title="Modules" href="http://www.url.com/test/index.php?page=modules" />
<link rel="next" title="Menu Manager" href="http://www.url.com/test/index.php?page=menu-manager-2" />

Re: cant get anchor to work on generated pages i.e news deta

Posted: Sat Dec 28, 2013 8:20 pm
by Dr.CSS
The accessibility style sheet hides the accessibility class objects from front end page views, you would have to look in both page template to tell where those URLs/links come from, the News ones look canonical links in the top of the <head>...

Re: cant get anchor to work on generated pages i.e news deta

Posted: Tue Dec 31, 2013 2:25 pm
by JohnnyB
The {anchor} tag doesn't print navigational Link elements. It will create a link to an area designated in your web document. The link should point to an element's ID attribute.

This tag will generate a link to an element with an ID of "top"
{anchor anchor='top' text='' onlyhref='true'}
for example, it will be looking for an element like, <div id="top"> to point to.

If an element ID is not available you can you use something like this in your template:
<a name="top"></a>

Then the URL generated can be placed into an <a> element to create a link:
<a href="{anchor anchor='top' text='' onlyhref='true'}">Go to top</a>