Thursday, 7 June 2012

How do I get the URI of the current web page from my Drupal theme?

How do I get the URI of the current web page from my Drupal theme?
Hi,
I have a website content development and web designing. And I this web site I need to create a drupal structure with the home page and up to 3 internal page templates. All the image and graphic work done in the Photoshop and CorelDraw, using this site I want to uploaded some text data with the additional pages and also I want to manage all the content of this site and in my requirement I want to get the URI of the current web page from my Drupal theme? So please share your knowledge with me
Reply With Quote
#2
Old 28-01-2010
Techno01's Avatar
Techno01 Techno01 is offline
Member

Join Date: Apr 2008
Posts: 2,268
Re: How do I get the URI of the current web page from my Drupal theme?
Hey I tell you about the Uniform Resource Identifier (URI),Uniform Resource Identifier is a is a string of characters and it is use to identify a name or a resource on the Internet. Uniform Resource Identifier help to identify and enables interaction with representations of the resource over a network, with the help of some protocols. These protocols are concrete syntax and associated protocols define each URI. I think this information will increase your Uniform Resource Identifier (URI) knowledge.
Reply With Quote
#3
Old 28-01-2010
Techguru01's Avatar
Techguru01 Techguru01 is offline
Member

Join Date: Oct 2005
Posts: 2,116
Re: How do I get the URI of the current web page from my Drupal theme?
Hey used following in this code you get your own URL link, this code mostly use for “Back to Top” and same like this but following code is for “Back to Top” code, you able to edit this code.
This is PHP code:
Quote:
#top">your message
Reply With Quote
#5
Old 28-01-2010
Trio's Avatar
Trio Trio is offline
Member

Join Date: May 2008
Posts: 2,752
Re: How do I get the URI of the current web page from my Drupal theme?
Hey following codes are use for test and then decide for implement.
Quote:
$curr_uri = check_plain(request_uri());
If you don’t use the check_plan in your code then use following code and using following code you can get the Drupal page URI like this:
Quote:
$curr_uri = request_uri();
but my suggestion for you to use check_plain method, it will help you to URI is properly encoded.
Reply With Quote

No comments:

Post a Comment