想实现在文章页面调用本页URL,用{dede:field name='arcurl'/}。生成的URL居然是{typedir}/{Y}{M}{D}/{aid}.html的形式,为什么会这样,于是满站的找,终于在inc_archives_view.php在该文件MakeHtml()函数中发现$filenameFull = GetFileUrl(...)这个函数调用,于是又顺藤摸瓜找到了inc_channel_unit_functions.php在其中发现了GetFileUrl()的原型,看了半天才发现第二个双引号部分,就是函数原型中$arcdir的位置,用$this->Fields["arcdir"]来代替,改后生成一篇文章测试了下,HOHO终于搞定了~~~
如有遇到同样问题的网友可找到inc_archives_view.php(在include里)
查找
$filenameFull = GetFileUrl(
$this->ArcID,$this->Fields["typeid"],$this->Fields["senddate"],
$this->Fields["title"],$this->Fields["ismake"],
$this->Fields["arcrank"],"","",$this->Fields["money"],
true,
$this->TypeLink->TypeInfos['siteurl']
);
将其替换为
$filenameFull = GetFileUrl(
$this->ArcID,$this->Fields["typeid"],$this->Fields["senddate"],
$this->Fields["title"],$this->Fields["ismake"],
$this->Fields["arcrank"],"",$this->Fields["typedir"],$this->Fields["money"],
true,
$this->TypeLink->TypeInfos['siteurl']
);
没有评论:
发表评论