Questions tagged [tags]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

How to set tags via graphQL?

I'm trying to create entries programmatically and setting tags on them. However, I can't figure out if this is possible or not, and can't find documentation explaining this. I'm basically trying to do ...
1
vote
1answer
21 views

Are categories first class citizens compared to tags?

I understand the difference between categories and tags. I am trying to choose between them as my taxonomy is not very deep and tags seem just as good as categories. But it occurs to me that ...
1
vote
1answer
41 views

How to add tags to an entry per site basis. And then only get the tags for that site in the frontend

I have craft pro and have one tagGroup called Tags Then I created a Tag field called newsTag like this: When I add a tag for german, the tag is also created in the database for dutch and english, so ...
0
votes
1answer
37 views

Query only Tags wich are not connected to a revision

I wrote a query like this: $query = (new Query()) ->select('COUNT(elements.id) as count, tags.*') ->from('relations') ->join('INNER JOIN', 'tags', '{{relations}}....
10
votes
4answers
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.
1
vote
2answers
96 views

Frontend Form Search Users based on Tags

Context: I'm trying to build a search form that will filter users based on Name, Skills and School. Users who have any of the search criteria should appear in my results. Name Is a fuzzy keyword ...
1
vote
2answers
48 views

Display entries which share tags (2 or more)

I need to be able to display entries (within one section) that share keywords. I don't care what the keywords are, just want to display the entries based on 2 or more shared keywords. Anyone know how ...
1
vote
2answers
127 views

Save an entry with tags

I have a project that the user choose a tag (tags are already created) and save the information. I try save a entry which has a tag field, all the stuff saves, but the tags don't. I try search ...
1
vote
1answer
21 views

Building my first Sprout Form and need ability to add Tags input

I'm building my first Sprout Form and I need a tags relational field, but where the user filling in the form can add their own tags, but if similar/matching tags exist then they can select them, like ...
1
vote
2answers
2k views

Category vs Tag

Is there a fundamental difference between a Craft Category and a Tag? I originally set up a site using Tags before the Category feature was available and now I'm adding a new section and trying to ...
13
votes
4answers
22k views

Removing whitespace from {{ tag.name }}

I'm using tags to do some Javascripting. Is there any way that I can tell Craft to remove whitespace from {{ tag.name }} if the tag.name has spaces (for example 'apples and carrots'), and add dashes (...
1
vote
1answer
74 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
201 views

Fetch Entries with Tags Only

I'm trying to get all the entries which have tags associated with them. At the moment I'm doing: $entries = Entry::find()->with('tags')->all(); and then filtering the results in PHP as ...
1
vote
1answer
81 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
2answers
330 views

Craft Query by Category and Tag

I am trying to find the last four Channel entries (Named: Post) with a Category relatedTo "Support" (id: 458) AND Tag relatedTo: "Widget1" (id: 469) I've had success using Category or Tag but not both:...
1
vote
0answers
62 views

get tags related to entry

I'm working on Craft plugin which should find entries with special tags. In my action I have a string: $entries = Entry::find()->section('Projects')->type(['Projects']); and it returns all ...
1
vote
1answer
225 views

Filter entries by tags

Still very new to Craft but just can't figure this problem out, it's a level above me at the moment. I have an FAQ page as a 'single' that I would like to display all entries from a channel by ...
1
vote
1answer
437 views

Product Filtering with Tags

I've built a product filtering system using tags and currently have 2 available tag groups under different fields. Size and Type Currently if I select 1 tag from both size and type, it shows all ...
2
votes
1answer
250 views

Quick check to see if tag exists?

Just wondered if there's a quick way to see if a specific tag exists from anywhere in the site (by ID)? I'm creating a navigation bar, and need to include a specific tag... only if it has been ...
0
votes
1answer
82 views

How to add tags in craft CMS 3

This is my first template that im working on in craft cms3, i've managed to make the most of the homepage and other tabs of website dynamic using the CMS, but I can't figure out how do I make tags and ...
7
votes
3answers
2k 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 ? ', ' ...
5
votes
2answers
2k views

Get the Category name into the URL for an entry

I have a gallery which is categorised. The gallery is a Structure section where the user adds an entry and then assigns it to a category - all good. At the moment, when clicking on an entry title the ...
1
vote
2answers
212 views

Filtering by categories AND tags with full match

We're trying to filter by categories AND tags in the one form. However can't seem to get things working as we would like. Essentially, we have a form that pulls in the tags and allows multiple ...
2
votes
2answers
390 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. ...
6
votes
2answers
731 views

How to delete tags in Craft CMS 3

I want to delete some of the tags that are entered in the system. Since there is no way to do that in Control Panel, and there is not a valid plugin that can do this (know that from my previous ...
2
votes
2answers
367 views

How do I hide tags in a category that have no entries?

Entries can have one of two categories and one tag. (People = entries | program = categories | year = tag) On the pages I'd like to display entries related to the category and grouped by tag. ...
1
vote
1answer
15 views

Editing a tag not reflecting on all records.. kindof

We have hundreds of entries with the improperly spelled tag "accessibilty" (the third i is missing). A search for "accessibility" will not find them (spelled correctly). I edited the tag on a record ...
0
votes
1answer
88 views

I would like to implement the remarketing tag into my website

I was wondering if anybody can help me with the implementation of the remarketing tag into my site. I have the codes and I just don't know where to enter them.
2
votes
1answer
212 views

Add Tags to a Newly Created Entry With PHP in Craft 3

I am able to successfully create new entries with PHP when I am using basic field values that are Rich Text or Plain Text fields, but am unsure how to add Tags to an entry. So my entry already has a ...
3
votes
1answer
222 views

Where are tags stored in the database?

Seeing as there currently isn't a way of deleting / managing tags in Craft3, I was wondering if someone could point me to where in the database these tags are stored so I can delete them manually. ...
2
votes
2answers
327 views

How to set multiple 'active' classes from query string

I'm outputting all tags that are in use and then allowing the user to click these build up a query string to filter and display the results. It's all working fine. Except, I'm having difficulty ...
0
votes
1answer
41 views

My `for` loop has fallen...and it can't get up

I want my <ul> to show a single tag representing all "active" entries ( "active" using a custom lightswitch field in the entry: fellowStatus. Each tag is a year (e.g. 2014, 2010, etc) E.g. if ...
1
vote
1answer
611 views

SEO titles/descriptions for tags and archive pages

I have a blog setup with a Categories, Archive and Tags. In my _layout template I've been using the following to pull in SEO titles from fields, or Page/Category Titles is that's not been defined. {%...
1
vote
1answer
81 views

Ajax - Create tag with custom ID programatically

I'm trying to create an jQuery/Ajax script to import data from a Wordpress API service and want to import the WP tags into my database. Everything works as expected when I loop through the data and ...
1
vote
1answer
387 views

How can I add programmatically a Tag after SAVE_ON event in case of Assets types

We have to update the Asset after the SAVE_ON event, and the Craft::$app->elements->saveElement($asset); Not seems to be working (it is getting timed out). So what is the best pratice to ...
1
vote
2answers
658 views

Help with tags input field on a front-end entry form

I need to make a "keywords" field on a front-end entry form that can create tags in the cms (Craft 2). I am fully aware of existing tickets regarding this issue like Brandon Kelly's but they're a ...
1
vote
1answer
480 views

Get Entries That Match ALL of the tags specified

I have a search page where a user can check about 20 different checkboxes, where these checkboxes all relate to tags I have set up inside of Craft. I would like to perform the following search query: ...
1
vote
1answer
139 views

Tag Localization: how to create a tag without translation fallback version?

I'm dealing with tag localization on an English/Spanish site and have figured out that if I create a new tag, both En and Es elements are created by default, which would be O.K. if I never had to ...
3
votes
1answer
2k views

Query Entries by Tag

I want to only show entries that match a specific tag. I'm trying to do something like: {% paginate craft.entries.section('blog').relatedTo('tagName').order('score') as entriesOnPage %} This doesn't ...
2
votes
1answer
84 views

Multiple Tag Groups/Sets for separate channels

I have two separate channel types, let's say "News" and "Reviews" and each of those can have tags. Is it possible to have separate tags for each of those? So News has it's own set of tags, that can't ...
1
vote
1answer
54 views

Search for non-existing tags shows all entries

I have 3 groups of tags that redirect to the same template. tags/index.html. All the routing and linking those tags to their group page works well. <a href="{{ siteUrl }}taggroup/{{ tag.slug }}" ...
2
votes
1answer
592 views

How do I list the tag groups that are actually in use?

I'm developing a masonry photo gallery with some filters (colors, style, manufacturer, etc) and I want to use tags to filter them by. I need some navigation which should look like this: <ul> ...
1
vote
1answer
73 views

Trying to set a default asset folder using Craft tags

I'm trying to set a default asset folder for a field, as per the Craft docs on Dynamic Subfolder Paths. I'm trying to set the asset path for each blog article to be /our-journal/{date}/{slug}, where ...
1
vote
1answer
315 views

How to get a proper tag Url

I use the code "Link to the Tag URLs" from the following article: https://craftcms.com/support/tag-urls {% if entry.tags | length %} <h3>This entry is tagged with:</h3> <ul> {% ...
5
votes
1answer
961 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?
4
votes
1answer
110 views

Sort entries by best match to multiple categories

I've got a channel where entries will be tagged with multiple categories. I want to use those categories to show related content for each entry. So if an entry has cat_a, cat_b and cat_c, I want to ...
12
votes
4answers
2k 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
134 views

Difference between {% includeCssFile %} or including it with <link>

I go a simple question. I wanted to start with building my craft template from html and changed all css and tags to to equivalent {% includeCssFile %} or {% includeJsFile %}. The page was working ...
1
vote
1answer
274 views

Get random entry tagged with

Looking to get a random entry from my database which is tagged with 'featured', is this possible at all? I've seen randomised by just the entry loop but nothing else.
1
vote
1answer
100 views

How do I add the Categories and tags related to each entry?

This is my basic entry layout and I just want to display the linked category and tag names as indicated… <div class="posts sidemeta"> {% for entry in craft.entries.section('news').find() %} <...