how can i set up an anchor
- Smylo
- Topic Author
- Offline
- New Member
Less
More
- Thank you received: 0
17 years 8 months ago - 17 years 8 months ago #487
by Smylo
Hallo all,
i tryed a lot of things, but nothing worked for my satisfaction...
I want an anchor on the top of every page and a link button at the bottom to get every time as fast as possible from the bottom to the top without scrolling.
If i make a normal anchor and you click on the button you are redirected to my frontpage, so i tryed some thing with other button-code (link to anchor) and at the moment i used this code:this seems to be working, if you now click on the button you will be redirected to the top of the page, but the address changed to a normal content link without any SEF optimization...
I hope anyone can help me out with this problem
Thanks
Smylo
i tryed a lot of things, but nothing worked for my satisfaction...
I want an anchor on the top of every page and a link button at the bottom to get every time as fast as possible from the bottom to the top without scrolling.
If i make a normal anchor and you click on the button you are redirected to my frontpage, so i tryed some thing with other button-code (link to anchor) and at the moment i used this code:
<a href="<?php echo sefRelToAbs($_SERVER['REQUEST_URI'])."#oben"; ?>"><?php echo '<img src="' .$mosConfig_live_site. '/templates/' .$GLOBALS['cur_template']. '/images/nachoben.gif" alt="nach oben" width="70" title="zum Anfang der Seite..." height="21" border="0"/>'; ?></a>
I hope anyone can help me out with this problem
Thanks
Smylo
Last Edit: 17 years 8 months ago by Smylo.
Please Log in or Create an account to join the conversation.
- Saka
- Offline
- Administrator
17 years 8 months ago #488
by Saka
Emir Sakic
www.sakic.net
Hello,
If it's anchor tag within Joomla! content then just use ordinary anchor tags. No additional modifications are needed.
If it is outside content you must use following trick for the link:
Or if you just want to make a scroll to the top you can use javascript:
If it's anchor tag within Joomla! content then just use ordinary anchor tags. No additional modifications are needed.
If it is outside content you must use following trick for the link:
<a href="<?php echo sefRelToAbs(substr($_SERVER['REQUEST_URI'],0)).'#tag'; ?>">Link</a>
Or if you just want to make a scroll to the top you can use javascript:
<a href="javascript:scroll(0,0);">
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.