从 joomla 中删除 readmore 文章标题
如何从 Joomla 的阅读更多链接中删除文章标题?
我没有 sh404SEF。
<?php if ($this->item->readmore_register) :
echo JText::_('Register to read more...');
elseif ($readmore = $this->item->params->get('readmore')) :
echo $readmore;
else :
echo JText::sprintf('Read more', $this->escape($this->item->title));
endif; ?>
将此规则更改
echo JText::sprintf('Read more', $this->escape($this->item->title));
为:
echo 'Read More';
也不正确,因为它不是多语言的。
有人知道解决方案吗?
How can I remove the article title from the readmore link in Joomla?
I don't have sh404SEF.
<?php if ($this->item->readmore_register) :
echo JText::_('Register to read more...');
elseif ($readmore = $this->item->params->get('readmore')) :
echo $readmore;
else :
echo JText::sprintf('Read more', $this->escape($this->item->title));
endif; ?>
Change this rule:
echo JText::sprintf('Read more', $this->escape($this->item->title));
To:
echo 'Read More';
Is also not corrent because it's not multilangual.
Anyone knows the solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在后选项中对其进行配置。您可以在此处指定是否要显示该按钮,如果是,则是否应在其上显示标题。
您可以在帖子本身或整个类别或所有帖子的全局选项中进行配置。不幸的是,我不知道这两个选项的英文术语,因为我使用德文翻译。
=== 编辑===
好吧,我刚刚重新检查了一下。您添加一个新的菜单项,然后选择“类别博客”作为菜单项类型。然后在右侧打开“文章选项”面板。在那里,您会找到两个选项“显示“阅读更多””和“显示带有阅读更多的标题”。选择“隐藏”后一项。这样,您的按钮/链接将仅包含文本“阅读更多”(或您选择的语言),而不包含标题;)
如果您想进行一般设置。还有另一种方法可以将此行为设置为默认行为。转到内容管理并在工具栏中选择“选项”。选择“文章”选项卡(这是第一个)。在那里你会看到我已经提到的两个选项。
You can configure it within your post-options. There you can specify if you want to show the button at all, and if so, if the title should be displayed on it.
You can configure that in the post itself or in the global options for a whole category or all posts. Unfortunately I don't know the english terms for this two options, since I use the german translation.
=== EDIT ===
Okay, I just rechecked it. You add a new menu-item and select for example "Category Blog" as Menu Item Type. Then on the right side you open the "Article Options"-Panel. There you'll find the two options 'Show "Read More"' and 'Show Title with Read More'. Choose "Hide" with the latter one. This way your button/link will only contain the text "Read More" (or which language you have selected) and not the title ;)
If you want to generally set this up. There is another way to make this behaviour default. Go to your Content-Administration and select "Options" in the toolbar. Select the tab "Articles" (it's the first). There you'll see the two options I already mentioned.
我得到了它!
更改
为
您也可以更改 language/nl-NL.com_content.ini 和其他语言中的文本
只需搜索阅读更多
I got it!
change
to
And you can change the text in language/nl-NL.com_content.ini and the other languages too
just search for read more