用current_path()路径为内部的路径
使用drupal_get_path_alias可以获取路径别名
<?php function drupal_get_path_alias($path = NULL, $path_language = NULL) { // If no path is specified, use the current page's path. if ($path == NULL) { $path = $_GET['q']; } $result = $path; if ($alias = drupal_lookup_path('alias', $path, $path_language)) { $result = $alias; } return $result; } ?>
本文介绍Drupal中如何通过drupal_get_path_alias函数获取路径别名。当未指定路径时,默认使用当前页面路径。若存在路径别名,则返回别名。
223

被折叠的 条评论
为什么被折叠?



