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

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
papergirl85
New Member
New Member
Posts: 2
Joined: Mon Nov 25, 2013 4:37 am

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

Post 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?
papergirl85
New Member
New Member
Posts: 2
Joined: Mon Nov 25, 2013 4:37 am

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

Post 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" />
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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>...
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

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

Post 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>
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Post Reply

Return to “Layout and Design (CSS & HTML)”