[Solved] How to use anchorlink with cms_selflink

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
ellenmarie
New Member
New Member
Posts: 4
Joined: Wed Dec 11, 2013 8:34 pm

[Solved] How to use anchorlink with cms_selflink

Post by ellenmarie »

I have searched and searched for the answer to this and I still can't get it to work. I need to have a link on a page that goes to another page 1/2 way down. I can do this very easily with html but I'd rather use the tags in CMSMS. I'm using this:

<a href="{cms_selflink href='leadership'}">Kollol Pal, Ph.D., MBA – Chief Executive Officer, Mnemosyne</a>

and I need it to go to another page and add an anchor there.

Here are the actual test pages:

Link at the very bottom of the page:

http://emmgraphics.com/projects/mnemosy ... -directors

Needs to go to the 3rd paragraph on this page:

http://emmgraphics.com/projects/mnemosy ... leadership

Any help would be very much appreciated. I'm not a newbie but I just can't get this through my head.

thanks!
Last edited by ellenmarie on Thu Dec 12, 2013 4:16 pm, edited 1 time in total.
User avatar
tophers
Forum Members
Forum Members
Posts: 218
Joined: Thu Jun 07, 2007 7:25 pm
Location: Calgary, Alberta, Canada

Re: How to use anchorlink with cms_selflink

Post by tophers »

I was just searching for this answer myself! Seems that {cms_selflik} is the way to go. This should work:

Code: Select all

<span class="red">
{cms_selflink page="leadership" dir="anchor" anchorlink="kollol" text="Kollol Pal, Ph.D., MBA – Chief Executive Officer, Mnemosyne"}
</span>
It looks like you need to link to an id, not a name, so change your link on the Leadership page to:

Code: Select all

<a id="kollol"></a>
Let me know if this works - I just finished setting up something similar on a dev site I'm working on.
ellenmarie
New Member
New Member
Posts: 4
Joined: Wed Dec 11, 2013 8:34 pm

Re: [Solved] How to use anchorlink with cms_selflink

Post by ellenmarie »

It works great! Thank you so much.
Post Reply

Return to “CMSMS Core”