Questions tagged [tags]

Tags are folksonomies for your entries, users, and assets.

Filter by
Sorted by
Tagged with
11
votes
2answers
1k views

How can I create a visually weighted tag cloud?

I kind of want a tag archive page where it doesn't just list all the tags and links to entries based on that tag, but where the sizes of the actual tag link vary based on frequency of use. Any idea ...
4
votes
1answer
900 views

How to add a tags-field to an entry form?

I use the following entry form (front-end): https://craftcms.com/docs/templating/entry-form How can I add a tags-field to this entry form?
9
votes
1answer
527 views

How can I best extend TagModel to add a `count` property?

I'm attempting to write a plugin to extend tags by adding a count property that'd be useful identifying popular tags, making a tag cloud, and anything else where a count would be useful. The Goal ...
2
votes
2answers
982 views

How can I use tag slugs in URLs?

This question is a summary of my working with tags yesterday, I'm posting my findings to SE so other people can benefit. For the purposes of this question, I'm going to be using a tag with the title '...
10
votes
3answers
1k views

Order tags by count - e.g. Top 10 Tags Used

I would like to have a Top 10 Tags list in descending order. I'm able to list and limit 10 tags used, but the order parameters are limited to name, group, and date essentially.
4
votes
1answer
237 views

Limit search results for users by tag (and limit to 5 tags)

I've read as many forum posts and documentation but am a little stumped over a specific use-case. Currently the search page grabs the url segment, loops through a verified user group, and uses the ....
11
votes
4answers
1k views

How do I delete a tag?

Where in the Craft Control Panel can I globally delete a tag? Not from a specific entry, but completely out of the system.
3
votes
1answer
702 views

How do you add tags to tag field when saving an entry?

I'm working on a custom import plugin which needs to import a load of content to fields including categories and tags. Categories is working fine using a comma separated list of category ids: ...
2
votes
1answer
227 views

How can I group a list of tags into ranges of first letters (A–E, F–J, etc.)?

I'd like to be able to fetch a list of tags from a blog section and then group them into ranges of letters. I've used this code to fetch and group a list of tags by first letter: {% set entries = ...
4
votes
4answers
2k views

Looking to use a tag slug/URI and loop through entries of that tag

It doesn't appear that tags are handled the same way as categories in the sense that categories have a slug (which results to a URI). I'd like to use tags to link to a "tag" page, similar to a ...
2
votes
1answer
449 views

Plugin: Tags field for front-end Entry Form

I would like to add tags via a front-end entry form - not like here, but as follows: Text field in a front-end entry form where user add tags (separated by commas). After pressing the save button, ...
1
vote
1answer
399 views

Show all tags related to a category?

Is it possible to show all tags that are related to a category? I can't find anything on it. Thanks. Edit: What I am looking for is this: I know a category slug or name. I want to get all tags ...
7
votes
3answers
1k views

How do I display tags comma separated with “and” between the last two tags?

I would like to output a tag-list like this: foo, bar and baz I know how to elegantly output a tag list with no comma after the last tag: {% for tag in tags %} {{ tag }}{{ not loop.last ? ', ' ...
2
votes
2answers
307 views

Sharing a template with identical category and tag name

I'm trying to stay as DRY as possible here and sharing one template for a news list view; all, category and tag all sharing the same template (and trying to refrain from having a category or tag ...
1
vote
1answer
526 views

Use of tag.slug instead of tag.title in a custom route

I've followed this guide for creating a routes to list entries with specific tags. It is working fine except that I have muli-word tags so using the tag token from Settings -> Routes gives me urls ...
0
votes
1answer
170 views

Is there a way to limit output of Tags related to an entry?

I've checked it with documentation but, tag model doesn't have limit() property as entries have. Wondering, If there is any way around to achieve it?
2
votes
1answer
140 views

Best method to handle %20 in tag URLs with multiple words

On my page of all tags, it works great except for tags that have more than one word. The URL is replacing the spaces with %20 as one would expect. http://www.colorcomputergames.com/tags/ I tried ...
2
votes
2answers
279 views

Still not able to manage tags in Craft 3?

I have page where I display some items and there are filters by tag. So I make a list of all tags that are created. Then when the user click on some of the tag, he see only the product with that tag. ...
2
votes
1answer
406 views

Display entries that meet multiple tag params

how would I go about setting up a route and twig template to filter by multiple tags? Example URL scheme: example.com/tags/tag1/tag2/tag3 where tag1, tag2 and tag3 are tags defined in a tag field ...
2
votes
1answer
191 views

List entries without specific tag

I am trying to output a list of entries from a channel section that DO NOT have a certain tag. I am able to output the entries that have the tag assigned by setting the tag as a variable and using ...
1
vote
1answer
38 views

How do I add an H2 tag to a page?

How do I add an H2 tag to a page? The site already runs many months now. All pages are okay but some are lacking an h2 tag. Is there a simple way to add an h2 tag to these pages?
1
vote
1answer
36 views

Display entries by tag

I've read through the docs but can't figure out what I'm doing wrong here: I'd like to display a list of entries by tag, where the tag is in segment 2 of the url. Here's what I've tried and is not ...
1
vote
4answers
803 views

Problem with accents in tags & URL

I'm having a problem getting entries related to a tag with accentuated characters. Here is what the URL looks like : fr.craft.dev/actualites/tag/Traçage%20électrique The same page work fine with a ...
1
vote
2answers
91 views

Tag mysteriously not found

Weird issue where a tag was not found using the tags search query. That tag is in the CMS (in news entries) as well as the DB, and even shows up in other queries. Query in question: {% set tag =...