It's better to use de API for url generation

joanpc's picture
Offline
Joined: 06/04/2008
Juice: 59
It's better to use de API for url generation

http://api.drupal.org/api/function/url/6

Like for the link element:

$output .= "" . url('node/' . $product->nid, array('absolute' => true)) . "\n";

With the url() call the path is translated if custom path exist, with the 'absolute' => true option the hostname is also added to the url i we don't have to check GLOBALS.

Nice module, it deserves to be in a drupal project page in order to submit patches and track bugs.

Google Base RSS Feed, 2.3.1 By: danbaker (40 replies) Sat, 06/20/2009 - 12:36