[英]Modify Joomla Tags Result Page
I want to show my article intro text and item image with link to the full article in the result page for Joomla Tags. 我想显示我的文章介绍文字和项目图片,并在结果页面中显示Joomla标签的全文。
Is there a way to do this, or how can I modify the code to get the expected results? 有没有办法做到这一点,或者如何修改代码以获得预期的结果?
I tried to add in components\\com_tags\\views\\tag\\tmpl\\default_items.php <?php echo $this->item->introtext; ?>
我试图添加components \\ com_tags \\ views \\ tag \\ tmpl \\ default_items.php <?php echo $this->item->introtext; ?>
<?php echo $this->item->introtext; ?>
but it does not work there as in other cases. <?php echo $this->item->introtext; ?>
但在其他情况下不起作用。 I do not know php well enough, so would like to know if there are other suggestions. 我不太了解php,因此想知道是否还有其他建议。
Thanks 谢谢
Updated 更新
Use <?php echo $item->core_body; ?>
使用<?php echo $item->core_body; ?>
<?php echo $item->core_body; ?>
because the tags results use the standardized field names. <?php echo $item->core_body; ?>
因为标记结果使用标准化的字段名称。
However the standard view of tagged items (non compact) contains an option that allows you to display the text (it will be intro text for an article, description for a weblink, category or news feed, or street address for a contact). 但是,带标签的项目的标准视图(非紧凑型)包含一个允许您显示文本的选项(它将是文章的介绍性文本,网络链接的描述,类别或新闻提要或联系人的街道地址)。 You need to select this when making a menu item for that tag. 在为该标签创建菜单项时,需要选择此选项。 Or got to global settings and change Item description
to show or make a layout that does not use the show/hide parameter or defaults to show. 或进入全局设置并更改“ Item description
以显示或进行不使用show / hide参数或默认显示的布局。
This is the relevant code block: 这是相关的代码块:
<?php if ($this->params->get('', 1)) : ?>
<?php echo $item->event->beforeDisplayContent; ?>
<span class="tag-body">
<?php echo JHtml::_('string.truncate', $item->core_body, $this->params->get('tag_list_item_maximum_characters')); ?>tag_list_show_item_description
</span>
<?php echo $item->event->afterDisplayContent; ?>
<?php endif; ?>
Notice that tag_list_show_item_description can be turned on or off. 请注意,可以打开或关闭tag_list_show_item_description。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.