I am currently themeing a Drupal site that is in subdomain of /new as it is a replacement of the current site. I have a couple of hard coded links in the theme and was wondering if there was a simple variable I could use to print the base URL so I wouldn't have to go back in and change everything from /new to "" when the site goes live. I tried $base_url as defined in the settings.php file but it did not work. I've since put my own together in my template.php file but was wondering if a variable already existed that I should be using.

Thanks.

Comments

chrishaslam’s picture

<?php global $base_url; print $base_url;?> should do it

--------------------------------------------------------
http://www.AnfieldRed.co.uk

---------------------------
Managed Drupal hosting from Ixis IT