1
votes

I want to show my article intro text and item image with link to the full article in the result page for Joomla Tags.

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; ?> but it does not work there as in other cases. I do not know php well enough, so would like to know if there are other suggestions.

Thanks

1
This question appears to be off-topic because it is about Joomla functionality and would be better off on the Joomla Q&A StackEchange site.Craig
1. Don't modify core files, Joomla has overrides, you lock yourself out of security updates by doing that. 2. What version of Joomla are you using?Craig

1 Answers

0
votes

Updated

Use <?php echo $item->core_body; ?> because the tags results use the standardized field names.

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.

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.