Datalife engine:当前页面的URL

我们在任何地方显示当前页面的链接。
方便用于块“共享”
网站上没有负载,只显示一个标签..

打开engine / modules / main.php文件并查找:

<span class="variable">$tpl</span>->result[<span class="string">'main'</span>] = str_ireplace( <span class="string">'/templates/FDv2'</span>, <span class="variable">$config</span>[<span class="string">'http_home_url'</span>] . <span class="string">'templates/'</span> . <span class="variable">$config</span>[<span class="string">'skin'</span>], <span class="variable">$tpl</span>->result[<span class="string">'main'</span>] );

下面我们添加:

<span class="variable">$tpl</span>->result[<span class="string">'main'</span>] = str_ireplace( <span class="string">'{page-url}'</span>, <span class="string">'http://'</span>.<span class="variable">$_SERVER</span>[<span class="string">'HTTP_HOST'</span>].<span class="variable">$_SERVER</span>[<span class="string">'REQUEST_URI'</span>].<span class="string">''</span>, <span class="variable">$tpl</span>->result[<span class="string">'main'</span>] );

现在{page-url}标签可用

订阅评论
提醒
guest的头像

0 评论
内联反馈
查看所有评论
0
希望看到您的想法,请您发表评论x