Drupal 7 ..在块

时间:2018-02-06 09:45:59

标签: drupal-7

我正在使用drupal 7并在我的localhost / mydrupal中工作 我想在自定义块中添加一个链接 我写了

<p><a href="/">Home</a> | <a href="/user">Connect</a></p>

点击进入主页我在<​​strong> localhost / 而不是 localhost / mydrupal 点击连接我在 localhost / user 而不是 localhost / mydrupal / user

有任何想法请更正此问题吗? 提前谢谢..

1 个答案:

答案 0 :(得分:0)

Hi you can use $base_url for this
<code>
Example :
<?php
global $base_url;
?>
<p><a href="<?php print $base_url;?>">Home</a> | <a href="<?php print $base_url;?>/user">Connect</a></p>
</code>
相关问题