Remove Tags from Category Blog View Only Topic is solved

Everything to do with Joomla! 4.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
DJBenz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 184
Joined: Tue Jan 20, 2009 8:34 am
Contact:

Remove Tags from Category Blog View Only

Post by DJBenz » Fri Feb 09, 2024 12:22 pm

So I have a few menu items that display Articles: Category Blog view Example Here

As you can see, the tags are displayed under the details for each article.

Tags are also displayed in single article view Example Here (Tags Display is set to "split" so they appear at the bottom of the article).

Is there a way to turn them off for the Category Blog view only? I had done this on a previous template with an override to the blog_item.php file within the template structure and removing the following code:

Code: Select all

<?php if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
        <?php echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?>
    <?php endif; ?>
However, the only similar file I can find with J4 and Cassiopeia is located in

Code: Select all

components/com_content/tmpl/category/blog_item.php
I'm hoping there's a more simple way to do this in J4 via admin if possible?

User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1677
Joined: Tue Jun 30, 2020 12:17 pm

Re: Remove Tags from Category Blog View Only

Post by Pavel-ww » Sat Feb 10, 2024 8:43 am

Hi.

Again you complicate. :)

Very simple:

Code: Select all

.com-content-category-blog__item .tags {
	display: none;
}

DJBenz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 184
Joined: Tue Jan 20, 2009 8:34 am
Contact:

Re: Remove Tags from Category Blog View Only

Post by DJBenz » Sat Feb 10, 2024 9:43 am

Pavel-ww wrote:
Sat Feb 10, 2024 8:43 am
Again you complicate. :)
And again you simplify and it works perfectly, thank you!


Post Reply

Return to “Templates for Joomla! 4.x”