Email
Share

We Rock Your Web Forum » Content Management Systems » Drupal

Drupal PHP Get URL Alias

(2 posts)
  1. DrupalJunkie

    senior member
    Joined: Oct '09
    Posts: 77

    I think recall there being a php method that allows me to get the page URL. All I need is the part after the domain name. In Drupal, basically the page URL generated by "clean alias."

    Is there a specific Drupal php function that will let me get this as well?

    Posted 1 year ago #

  2. Posted 1 year ago
  3. cwd

    senior admin
    Joined: Jul '09
    Posts: 225

    You can use this:

    <?php $alias = drupal_get_path_alias($_GET['q']); //get URL alias ?>

    That will contain the URL alias of the given page, for example, when used in your page.tpl.php theme file.

    Posted 1 year ago #

RSS feed for this topic

Reply

(required)

Allowed markup: BBcode blockquote code em strong ul ol li font strike center u hr.
You can also put code in between backtick ( ` ) characters.