How can I disable linked titles and the link on the image in a menu item tagged list?

I am running Joomla 3.9.14.

  • Welcome to JSE. Please take our tour. While your question is reasonably clear, please include proof of effort (links to documentation that you read, links to tutorials that you read, and/or your own coding attempts) and for context -- perhaps a screenshot of what you are currently getting versus what you want. This will help future researchers to understand if their own question is identical to this one. Adding more text to your question body will also provide better searchability (traffic from search engines). Showing your work will spare volunteers from telling you what you already know. – mickmackusa Jan 25 at 21:52

You can do this by creating an override for the com_tags layout file which outputs your list, as described in https://docs.joomla.org/J3.x:How_to_use_the_Template_Manager.

When logged on as a Super User go to Extensions / Templates / Templates, select the Site option and click the template which your site is using. This will lead you to the Templates: Customise page.

First of all, in the Editor tab click on the explorer display down through "html" and check there isn't a set of files under html/com_tags/tag.

Go to the Create Overrides tab and click on com_tags in the Component column, and then on tag. This copies the layout files from their usual place under com_tags into the template folder structure under the html folder.

Go back to the Editor tab and open the folders under html. You should now see 4 files under html/com_tags/tag. The file you want to edit is default_items.php, and you want to replace html <a> elements in a couple of places with just the title and image.

Click on default_items.php to edit it, and the file should appear in an editor on the right hand side. Go down to these lines:

<a href="<?php echo JRoute::_($item->link); ?>" itemprop="url">
    <?php echo $this->escape($item->core_title); ?>

Remove them and in their stead put in this line (the middle line of the three):

<?php echo $this->escape($item->core_title); ?>

Scroll further down to the lines

<a href="<?php echo JRoute::_($item->link); ?>" itemprop="url">
    <img src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>" itemprop="image">

and replace these with just the middle line

<img src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>" itemprop="image">

Click on Save, and your site should now just show the title and image, but without having links.

If you encounter problems you can click on Manage Folders, delete the com_tags folder under html and get back to where you started.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.