03
Mar

One of the easiest ways to get the full path of the current Drupal page is to call Drupal’s url function with following params:

url($_GET['q'], array('absolute' => true));

The fist param $_GET['q'], will give the name of the actions with paramsĀ  and array(‘absolute’ => true) param will tell the url function to return absolute path of the current page. Try it.

Rajeev Pillai
Posted by on 03 Mar 2010 by Rajeev Pillai in Drupal

One Response to “How to get the full URL of the current Drupal page”

Add reply

*