我的主题不是英文的。因此,当我访问任何主题的页面(来自页面列表块)时,该主题页面 URL 的最后一点也使用相同的语言。有什么办法可以改变吗?有什么方法可以将主题 URL 更改为英语,同时将主题名称保留为另一种语言?与页面名称相同的方式 - 您可以将 SEO 部分中的页面 URL 更改为您想要的任何内容,页面名称和页面 URL 可以不同。我怎样才能为主题做到这一点?
我在主题列表块中找到了这个:
public function getTopicLink(\Concrete\Core\Tree\Node\Node $topic = null)
{
if ($this->cParentID) {
$c = \Page::getByID($this->cParentID);
} else {
$c = \Page::getCurrentPage();
}
if ($topic) {
$nodeName = $topic->getTreeNodeName();
$nodeName = strtolower($nodeName); // convert to lowercase
$nodeName = Core::make('helper/text')->encodePath($nodeName); // urlencode
return \URL::page($c, 'topic', $topic->getTreeNodeID(), $nodeName);
} else {
return \URL::page($c);
}
}
我想我必须以某种方式将 nodeName 转换为英文。也许使用页面中使用的音译工具(我不知道在哪里)?
非常感谢。