Create article category, create one or more articles in this category, create one or more tags and assign these to your articles.
Create a menu item of the type Articles > Category blog for your category
On the tab Category of your menu item settings, set the parameter Tags as Hide and as Show, and check the results in the frontend.
On Show I expect the tags te bo visible in the blog view.
On Hide I expect the tags NOT be be visible in the blog view.
Also I expect this to be independent of the setting for the param Tags on the Options tab.
The tags in the Blog view are displayed according to the setting Tags on the Options tab, not to the setting on the Category tab.
Joomla 5.3.2, Cassiopeia template.
I was able to solve this by editing the file components/com_content/tmpl/category/blog_item.php
On the lines 56 and 74 there is this condition: $params->get('show_tags', 1)
I changed this to: $params->get('show_cat_tags', 1)
This works because show_cat_tags is the actual name of the parameter on the Category tab.
The parameter that is currently used, show_tags, is the one on the Options tab.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Title |
|
Hi Brian,
Thanks for your reply. It took a moment before I understood what you mean. So we are trying to achieve something and we expected this option to be the way to do that. Now I see that this option servers another goal.
I made a screenshot of your video and I marked the tags that are assigned to the articles, not to the category. We want to hide these in the blog view, however do we want to show them in the article view. It seems to me that there is no way to accomplish that using the Tag setting in the menu item, on the tab Options. The tags are either displayed or hidden in both views.
Is it correct that there is no way in the core to do what we are after? I would be happy to hear if there is way and we just missed it :-)
If there is no other way to do this and the current situation is behaviour as expected, then in our situation we could put my edit to the blog view file in a template override.
Yet if this would be the case, I wonder if there are other users who want to differentiate between showing/hiding the tags in the blog view and the article view. If so, it might be an idea to add another parameter for that to the core.
Yet if this would be the case, I wonder if there are other users who want to differentiate between showing/hiding the tags in the blog view and the article view.
Yes.
If so, it might be an idea to add another parameter for that to the core.
And yes.
My work-around is to use the CSS property: display: none
.blog-featured .tags, com-content-category-blog .tags{display:none;}
there is no need for any extra parameter or css or overrides
To display the article's tags in the blog view and not in the article view is already possible
See the video demo
Hi Brian,
Thanks your reply. I am glad to hear that there is a method to differentiate, because adding more parameters is not a goal in itself. Yet I still have a question about this.
In your vid you are demonstrating the opposite of what I want: I need to hide the tags in the blog view and display them in the article view. When testing this on J.5.3.2, I set the parameter on the menu item tab Options to Hide. In all articles that are already present, the article specific Tags setting is set to: Use global (Show). However, this setting does not result in displaying the tags in the article view. It is only after explicitly setting it to Show that the tags appear in the frontend.
I think it would be more user friendly if this also worked according to the default setting. Or would there be a way to get around this as well?
a but confusing perhaps but you have misunderstood the options.
the tags setting on the category tab refers to tags on the category itself not the articles in the category
the tags setting on the options tab refers to tags on the articles in the category