I have http://shb.nodale.nl/producten were if you click on "toonzaal" for example, you go to the gallery of "toonzaal". I've tried {$smarty.server.REQUEST_URI}#toonzaal. This worked for an other site, but unfortunatly not for this one.
Why is it so difficult to target an id within the same page? Am I missing something?
Targeting an id on the same page is not working [solved]
Targeting an id on the same page is not working [solved]
Last edited by babel on Mon Dec 01, 2014 1:29 pm, edited 1 time in total.
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: Targeting an id on the same page is not working
An ID is unique, you can't use it more than one time on the same page.you have you to use class instead.
http://www.w3.org/TR/1999/REC-html401-1 ... ml#h-7.5.2
http://www.w3.org/TR/1999/REC-html401-1 ... ml#h-7.5.2
Re: Targeting an id on the same page is not working
Code: Select all
{cms_selflink page="$page_alias" anchorlink='toonzaal'}
But unfortunately i cant see any anchor name "toonzaal" in your example.
Kind regards,
HarmO
HarmO
Re: Targeting an id on the same page is not working
HarmO, thanks for the reply. Unfortunately it's not the solution. It changes the link-name to producten, being the name of the page.
Re: Targeting an id on the same page is not working
Use the text parameter.
http://docs.cmsmadesimple.org/tags/core ... parameters
http://docs.cmsmadesimple.org/tags/core ... parameters
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Targeting an id on the same page is not working
Jo Morg, I tried that. With jquery works fine. So I'll use that, untill there is a solution for my signaled problem.
Thanks anyway.
Thanks anyway.
Re: Targeting an id on the same page is not working
It's working now. Why, I don't know. All authors, thanks.
Re: Targeting an id on the same page is not working
you could use this:
href wil only get you the URL where Page wil get you the whole <a>-tag.
Code: Select all
<a href="{cms_selflink href="$page_alias" anchorlink='toonzaal'}>Your text here</a>
Last edited by HarmO on Sat Nov 15, 2014 1:27 pm, edited 1 time in total.
Kind regards,
HarmO
HarmO
Re: Targeting an id on the same page is not working
Without quotes:
Code: Select all
{cms_selflink href=$page_alias anchorlink='toonzaal'}
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -