You are here

drupal path

drupal 路径归纳

1. $base_url: 是globals.php文件里定义的全局变量,返回访问网站的根目录, 详见http://api.drupal.org/api/drupal/developer%21globals.php/global/base_url/7
注:$base_url 返回的路径后面不带/,所以在拼接url的时候要注意加上,如:
$link = $base_url . '/node/add';
?>

2. drupal_get_path('module', 'custom')

current theme
drupal_get_path('theme',$GLOBALS['theme'])

frontend default theme
$theme_path = drupal_get_path('theme', variable_get('theme_default', NULL));

Subscribe to RSS - drupal path

User login