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.
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.
Sign up to join this communityHow can I disable linked titles and the link on the image in a menu item tagged list?
I am running Joomla 3.9.14.
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); ?>
</a>
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">
</a>
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.