Found. In fact, it was a combination of both sentences:
$current_path = drupal_get_path_alias($_GET["q"]);
Thanks, though.
Update: previous solution not always working
Someone suggested using an alternative method:
str_replace(base_path(), '', drupal_get_path_alias(request_uri(), 1));
But is there a way to do the same without using the slightly expensive str_replace?
thanks
source share