Pass the SEF'ed URL into php?
- Saka
-
- Offline
- Administrator
-
17 years 11 months ago #816
by Saka
Emir Sakic
www.sakic.net
sefRelToAbs( substr( $_SERVER), 1, strlen($_SERVER)-1 ) ); should work if Joomla is installed in root.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- andyweb
-
Topic Author
- Offline
- New Member
-
Less
More
- Thank you received: 0
17 years 11 months ago #818
by andyweb
Thanks, but echo'ing that returns nothing, hrmmm. My joomla is installed in the root.
Excuse my ignorance ...but I don't quite understand how that code would help any though.
Thing is I don't want to return the, eg: /index.php?option=com_content&task=view&id=8&Itemid=23
I'd like to return the SEF'ed version of the URL, eg. /section/category/page-name.html
Is this possible?
PS. I noticed there seemed to be an extra bracket in there, so removed one at the end as the page was breaking at that point.
Excuse my ignorance ...but I don't quite understand how that code would help any though.
Thing is I don't want to return the, eg: /index.php?option=com_content&task=view&id=8&Itemid=23
I'd like to return the SEF'ed version of the URL, eg. /section/category/page-name.html
Is this possible?
PS. I noticed there seemed to be an extra bracket in there, so removed one at the end as the page was breaking at that point.
Please Log in or Create an account to join the conversation.
- andyweb
-
Topic Author
- Offline
- New Member
-
Less
More
- Thank you received: 0
17 years 11 months ago #839
by andyweb
Well not to worry, I got it ...the command I was after was:
sefRelToAbs($_SERVER);
sefRelToAbs($_SERVER);
Please Log in or Create an account to join the conversation.
- it-info
-
- Offline
- New Member
-
Less
More
- Thank you received: 0
17 years 11 months ago #847
by it-info
Regards, Christian
Where to put htis an what are the benefits?Well not to worry, I got it ...the command I was after was:
sefRelToAbs($_SERVER);
Regards, Christian
Please Log in or Create an account to join the conversation.
- andyweb
-
Topic Author
- Offline
- New Member
-
Less
More
- Thank you received: 0
17 years 10 months ago #860
by andyweb
Well, I was using this to serve specific banners to the various sections I have on my website.
So I was pulling the sef url, then using the explode function in php to extract the section name and using that name to serve the specific banner I wanted.
I'm sure there can be many uses for it...
So I was pulling the sef url, then using the explode function in php to extract the section name and using that name to serve the specific banner I wanted.
I'm sure there can be many uses for it...
Please Log in or Create an account to join the conversation.
- it-info
-
- Offline
- New Member
-
Less
More
- Thank you received: 0
17 years 10 months ago #861
by it-info
Currently i mange that via hundreds of custom-modules, publish in the specified menu-entry for a cat/section.
Regards, Christian
Thats a very great idea.... diefferent invocation-codes for different cats/sections......Well, I was using this to serve specific banners to the various sections I have on my website.
So I was pulling the sef url, then using the explode function in php to extract the section name and using that name to serve the specific banner I wanted.
I'm sure there can be many uses for it...
Currently i mange that via hundreds of custom-modules, publish in the specified menu-entry for a cat/section.
Regards, Christian
Please Log in or Create an account to join the conversation.