Anchor Issue

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
Dipankar
Forum Members
Forum Members
Posts: 19
Joined: Wed May 09, 2007 4:51 am
Location: India

Anchor Issue

Post by Dipankar »

Hi ....

I am encountering a funny problem with CMSMS with Anchor tag..... I have use the given code:-
Single-Origin Dark




Single-Origin Dark


Both are on the same.... when I click on the above link to got to the target paragraph, it actually goes to the index page... and this is happening with all the anchor tags.....

But when I test the same HTML format on my Local machine, it works fine....

Is there any special method of applying a Anchor tag in CMSMS....?

thanks

:-[
Dipankar Banerjee
www.dbanerjee.com
Kolkata
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: Anchor Issue

Post by tyman00 »

http://forum.cmsmadesimple.org/index.php?action=search2

Type in anchor you're answer should be covered. This has been widely discussed on the forum.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
twwitt
Forum Members
Forum Members
Posts: 149
Joined: Thu Aug 28, 2008 7:45 pm
Location: Minneapolis, MN

Re: Anchor Issue

Post by twwitt »

tyman00 wrote: http://forum.cmsmadesimple.org/index.php?action=search2

Type in anchor you're answer should be covered. This has been widely discussed on the forum.
This link doesn't go anywhere that I can see. And there really isn't a very good answer to this question anywhere that I can find.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: Anchor Issue

Post by paulbaker »

Hi

In Admin, go to Extensions -> Tags and you will see an anchor tag.  Click help and you will see how to use it:

Help for the anchor tag

What does this do?
Makes a proper anchor link.

How do I use it?
Just insert the tag into your template/page like: {anchor anchor='here' text='Scroll Down'}

What parameters does it take?

anchor - Where we are linking to. The part after the #.
text - The text to display in the link.
class - The class for the link, if any
title - The title to display for the link, if any.
tabindex - The numeric tabindex for the link, if any.
accesskey - The accesskey for the link, if any.
(optional) onlyhref - Only display the href and not the entire link. No other options will work


The problems you are seeing are because the the ? and following text in your URL is being lost and so the browser sends you back to your index (home) page rather than moving to another section of the page you are on.  The anchor tag solves this problem.  Just place the tag, with appropriate parameters, in your template.

Paul
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Anchor Issue

Post by Dr.CSS »

You may also be missing the base href in
Post Reply

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