Embarrassing Question

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.
Locked
swathes

Embarrassing Question

Post by swathes »

I know its prob really easy, but having mental block...  How do I print the url of the current page...?
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Embarrassing Question

Post by jmcgin51 »

interesting - I would have thought there would be a Tag for that, but I don't see one...  looks like you'll have to create a User-Defined Tag.  Maybe this tag can be incorporated into the core for the next release...
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm

Re: Embarrassing Question

Post by petert »

Code: Select all

<?php
echo $_SERVER['SCRIPT_NAME']
?> 
and here is the same subject:
http://forum.cmsmadesimple.org/index.ph ... w.html#new
Last edited by petert on Sat Dec 09, 2006 10:27 pm, edited 1 time in total.
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
swathes

Re: Embarrassing Question

Post by swathes »

echoing the Script name just gave me /index.php.... :(
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Embarrassing Question

Post by Dee »

midnightmind recently posted a url to this article which may help you.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Embarrassing Question

Post by jmcgin51 »

I'm confused - do I just copy and paste the script from that page into my user-defined tag?  If that's what I'm supposed to do, it doesn't work...
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Embarrassing Question

Post by Dee »

The script creates a variable $_SERVER['FULL_URL']. You'll probably want to

Code: Select all

echo $_SERVER['FULL_URL']
at the end if you use it in a UDT.
Locked

Return to “CMSMS Core”