Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
8 votes
Accepted

Get tags for an article

Use TagsHelper::getItemTags(): use Joomla\CMS\Helper\TagsHelper; $tags = new TagsHelper; $tags->getItemTags('com_content.article', $articleId); Where $articleId is article ID. Tags will be ...
Sharky's user avatar
  • 11.4k
5 votes
Accepted

Adding a new view to built in component (com_tags)

There are multiple ways to add functionality or output views to existing components. You could try a template override. If you need more data then available in the component's model, then you could ...
pe7er's user avatar
  • 2,058
4 votes
Accepted

Migrate meta keywords to tags

We have developed a script that does that and that can be found here. Essentially, we loop through articles and then we grab the keywords, add them as tags, and then tag the articles. We have mainly ...
itoctopus's user avatar
  • 3,226
4 votes

How do I get an unordered list of article tags in category blog view?

Try the following code and see if it gives you the output you want: <ul> <?php foreach ($this->item->tags->itemTags as $tag) : echo "<li>" . $tag->title . "</li&...
johanpw's user avatar
  • 13.3k
4 votes

How can I get a List of All Tags to have no pagination by default?

Go to the menu that includes the list of all tags, then open up the page you created as a list of all tags. There should be a menu tab called "selection options". Set "Display Select", "Pagination" ...
Dan's user avatar
  • 341
3 votes
Accepted

How to query for users that have all tags when searching for multiple tags?

Tags - Similar module uses HAVING clause to achieve this. $query->having('COUNT(' . $db->quoteName('tags.tag_id') . ') = ' . count($tags)); But I'm not sure if this is the best possible ...
Sharky's user avatar
  • 11.4k
3 votes
Accepted

How can I filter downloadable documents using tags?

Joomla! 3 has native tagging features built in. See the Joomla! documentation How To Use Content Tags in Joomla! One way to accomplish your goals is to create a seperate article (i.e. a web page) ...
NivF007's user avatar
  • 2,097
3 votes

How to Joomla 3 use tags on extension?

You can use the tags functionality in your custom extension as follows: models/forms/formfile.xml - <field name="tagfieldname" type="tag" mode="ajax" label="Tag Field Name" description="" ...
Liz.'s user avatar
  • 1,385
3 votes
Accepted

Add Tags Feature to Custom Component

The changes necessary for getting the joomla mvc component tutorial working are listed in https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Upgrading_to_Joomla4#Miscellaneous_Changes. The tags ...
Robbie Jackson's user avatar
2 votes

Tag List Template Global Setting is Ignored

I just asked Google 'joomla tag list override' and it told me: http://forum.joomla.org/viewtopic.php?f=706&t=854545 Edit - Update 1: Copy components/com_tags/views/tag/tmpl/default.php and rename ...
Mikan's user avatar
  • 3,007
2 votes

Get parent category tags in template override

I did not remember how to get the parent category of article item, but to get the tags for current category you can try to use this code: $categoryTags = new JHelperTags; $categoryTags->...
Dmitrijs Rekuns's user avatar
2 votes

Create Numbered List of Tagged Articles

Hi you can use these CSS properties: counter-reset, counter-increment. for instance: .tag-category table { counter-reset: section; } .tag-category table tr{ counter-increment: section; } ....
Piero Marsilio's user avatar
2 votes

Tagged items blog layout

This is now a core feature in Joomla 3.8, i.e. filtering articles category blog layout with tags.
FishEagle's user avatar
2 votes
Accepted

Why does one menu item have a Hidden tag?

This option allows you to hide menu items in a rendered menu. This makes full ghost menus unnecessary. https://www.joomlashack.com/blog/tutorials/hide-menu-items/
Sven Bluege's user avatar
2 votes

Tags filter field - how to add custom "placeholder"?

Create a language override for the constant: JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS Extensions > Languages > Overrides Create a new override Type/paste "JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS" as the ...
Michael's user avatar
  • 593
2 votes

Creating custom form field type extended from standard tag field

I have found the easiest way to do this is actually not to use the tag form field at all. I know that sounds crazy, but when you want to store the tags and tag associations in your own database table, ...
Zachary Draper's user avatar
2 votes

Category blog - hide category (options) makes tags disappear

Using Protostar as Template and set in Menu "Show Category" to "Hide" and "Show Tags" to "Show" give what expected: No Category shown, Tags shown. No Matter if "Position of Article Info" is set to "...
franz.wohlkoenig's user avatar
2 votes
Accepted

How to debug an empty Bootstrap error generated by non-empty Tags field in a custom component?

To support tags in your component, you must add your content type to #__content_types table. Documentation: Using Tags in an Extension You have copied the row where: `type_title` = 'Contact ...
Sharky's user avatar
  • 11.4k
2 votes

Create tags by name programmatically

I was able to use createTagsFromField. #new# has to be appended to the title if the tag doesn't exist. $title = "Tag Title"; $h = new JHelperTags; $h->createTagsFromField(array("#new#$title"));
steel's user avatar
  • 217
2 votes
Accepted

Where does Joomla com_tags store the ordering data?

Use column lft to order by the tag component's ordering. The tags use nested ordering like the menu table - for a post that discusses nested ordering see Ordering Joomla menus in code
jamesgarrett's user avatar
  • 3,299
2 votes
Accepted

Display articles Tags in Tag View

The problem is that you haven't captured the tags associated with the article. The tags aren't held in the same table as the article data, so they need special code in order to be included. If you ...
Robbie Jackson's user avatar
2 votes

Tag Item programmatically

The shortest possible working version of this code is this as I tested this: use Joomla\CMS\Factory; use Joomla\CMS\Helper\TagsHelper; function addTagsToArticle($ucmId, $articleId, $tags) { $...
Zollie's user avatar
  • 2,936
1 vote
Accepted

Remove tag association when deleting an item in own component

I figured it out. Instead of using the JTable class, I import the model gameModel as described here. The by deleting the item via the model, the tag-associations are removed as well. This is the code ...
Yosh's user avatar
  • 13
1 vote
Accepted

Routing of news items not working as expected

Joomla does not handle routing well if a single category is assigned to multiple menu items. The routing system looks for the menu item that the category is assigned to. Once it finds it, it does not ...
Daniel Morell's user avatar
1 vote

How to query for users that have all tags when searching for multiple tags?

I took the time to set up my own test data and Sharky is correct (+1 to Sharky) about implementing a HAVING clause. $tag_ids = $params->get("tags"); $db = JFactory::getDbo(); $query = $db->...
mickmackusa's user avatar
  • 4,791
1 vote

Tagged items listing layout after clicking on a tag is displayed on homepage

Why this is happening? This is happening (showing the tags list page on homepage) because there is no menu item for this particular view. So Joomla, because it needs a menu item for each component's ...
FFrewin's user avatar
  • 19.7k
1 vote

Customization Of Joomla! Form Fields In Frontend (Tag Field Specifically)

Ok I figured it out! Rather than delete this question I'll post the solution in case anyone else has this problem in the future. As it turns out the inline style is actually coming from the site's ...
rudiments's user avatar
1 vote
Accepted

Hide tags in category blog layout

In short this is the hierarchy. Menu item layout can be overridden by Article options and the the Article Page itself has the final say so if you will.
norcal johnny's user avatar
1 vote

How to Joomla 3 use tags on extension?

For Joomla 3.7.x and every custom component, I took the answer from @liz and put the code in a separate function which you can call from everywhere and use it everywhere you want. Also I moved the ...
Robert's user avatar
  • 111
1 vote

Hide article titles on Tagged Items

There are a few layers of turning the title name off. If it is a category blog/list that setting will apply to the article. The Article options globally will be applied next(up right corner when ...
norcal johnny's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible