[solved] Back to Top link in template

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
lightfoot
New Member
New Member
Posts: 4
Joined: Mon Mar 15, 2010 1:06 pm

[solved] Back to Top link in template

Post by lightfoot »

How do I create a "Back to Top" link in the template? A link with the name "#" goes back to the main URL with set. I made a custom tag with "echo $_SERVER['PHP_SELF'] ;" but it picks up index.php.
Last edited by lightfoot on Sun Jun 13, 2010 6:02 pm, edited 1 time in total.
Peciura

Re: Back to Top link in template

Post by Peciura »

Usually $_SERVER['REQUEST_URI'] works ok.
You might want to check plugins {anchor} and {cms_selflink} on Extensions » Tags
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Back to Top link in template

Post by kermit »

assuming you have something at the beginning of your in your template with the css id="top" such as ...

simply use {anchor anchor='top' text='Top of Page'}
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
lightfoot
New Member
New Member
Posts: 4
Joined: Mon Mar 15, 2010 1:06 pm

Re: Back to Top link in template

Post by lightfoot »

Thanks. The {anchor} tag worked with
Last edited by lightfoot on Sun Jun 13, 2010 8:54 pm, edited 1 time in total.
Post Reply

Return to “CMSMS Core”