Questions tagged [taxonomy-terms]

"Taxonomy" refers to Drupal's content classification mechanism, organised into vocabularies and terms.

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

Is there anyway create relationship for filter criteria which has vocabularies( state, city and location) in views - Drupal 8

list of available Vocabularies in my content type. Country(Term: US) State (Terms: CA , CO, DE.. etc) City (Terms:Fremont, Irwin, Los Angeles, Monument etc..) Location(Terms: All loacations) I'm ...
0
votes
0answers
39 views
+50

Count of nodes filter in views for a taxonomy with depth

sorry for my English. In views, Drupal 8/9, is it possible to have the count of nodes for a taxonomy-term with depth? I would like to have it for the filters in views. I can't find any modules to get ...
0
votes
1answer
24 views

Attempting to merge in an array of items into Twig classes

I have a Twig template where I'd like to merge in an array of items as classes. So far I have this code: {% set classes = [ 'media', 'media--type-' ~ media.bundle()|clean_class, not media....
0
votes
1answer
27 views

How do I manage breadcrumbs when the node uses multiple vocabularies?

I have a blog in Drupal 8 and it uses the Categories vocabulary to display breadcrumbs as Home > Blog > [Category] > Post title. I added taxonomies from the Tags vocabulary, which means every ...
0
votes
0answers
15 views

View List with distinct term listing of multiple nodes

I have a map where multiple nodes are shown as marker (filtered by terms). Now I would like to add a caption (block) which explains the (filtered) marker. The map may contain several results with the ...
0
votes
1answer
41 views

How to get fields definitions of a vocabulary [duplicate]

I needed the field list related a vocabulary item.I was able to list the fields related to a content type by using like this: \Drupal::entityManager()->getFieldDefinitions('node', 'article'); But ...
0
votes
0answers
26 views

Call hook when changing hierarchy in taxonomy terms overview

I created a two-level hierarchy in a taxonomy vocabular and used it in an entity referenced field for a type of content, let's contextualize with an exemple. The hierarchy look like this : Tools 1 ...
0
votes
0answers
10 views

Taxonomy reference with sub-fields data entry

I am working on a Recipe node type which has a taxonomy reference field to my Ingredients taxonomy. The ingredients reference field is set to "Create referenced entities if they don't already ...
1
vote
1answer
23 views

Is it possible to change the Taxonomy Parent Term's select list to be a Hierarchical select list?

The Taxonomy relations > Parent terms select list is lengthy to look through so ideally we'd like a Hierarchical select list. We already use the Client-side hierarchical select module for other ...
1
vote
2answers
51 views

Change the path used by a route dynamically

Taxonomy terms have a canonical path of /taxonomy/term/{taxonomy_term} by default, which displays a View with content tagged with that term. For certain taxonomies I would like to use a different view,...
1
vote
1answer
27 views

How can I replace the hyphens in front of child terms with something else?

What code is responsible for adding - in front of taxonomy term sublevels on a taxonomy field in a node edit form? Even though the most non-intrusive way to override it is preferred, I'm comfortable ...
1
vote
0answers
11 views

Select nodes that share some of the same tags, and sort by tags in common count

I have nodes that can have many tags. I'm able to display nodes that share some of the tags. $query = \Drupal::entityQuery('node'); if ($nodeId != null) { $query->...
0
votes
1answer
57 views

Change page title

I've created a view to display products based on the taxonomy vocabulary Categories. I followed a few how tos and check for answers on drupal.org, here & other websites but none is working. I ...
0
votes
1answer
23 views

Create taxonomy terms [duplicate]

i'm new to drupal (just installed v9) and want to add a bunch of content. like in the question asked years ago (Create taxonomy terms on the fly) i want to add taxonomy terms on the fly while adding ...
0
votes
1answer
19 views

How to filter content by a specific taxonomy term when vocabulary allows multiple values?

I have defined a vocabulary that allows multiple terms to be checked for a Content Type and I would like to create a View that could gather all the data from that Content Type but grouping the results ...
0
votes
2answers
34 views

How to filter my view of Groups to show results matching Term A or Term B

I am adding taxonomy terms to groups (using the group module) and want to use the terms to filter groups within a view. However, my exposed filters don't seem to work. There is no error, but the ...
0
votes
1answer
16 views

View Taxonomy Term List with Exposed Has taxonomy terms (with depth) filter

I have view list of terms of a vocabulary. The terms of it have an entity reference field of another vocabulary (with hierarchically organized terms). I would like to filter the terms by that entity ...
1
vote
0answers
19 views

How do I migrate relationships from json_api source?

I'm trying to merge content from two D8 sites, using the migration api and json_api as a source. There are terms that have been migrated so I'm trying to migrate the relationships Source data looks ...
1
vote
1answer
50 views

Reuse fields programmatically

Conceptually and for performance purposes it is advisable to reuse existing fields in Drupal. This is very easy to do manually, but my question is, how can I do this programmatically? I have the ...
2
votes
0answers
33 views

How do I get a view to list nodes that have the same detail in a particular field as the current node?

Using D8, I'm putting together a genealogy site for my family and having a hard time creating a block that lists the brothers and sisters of the Person being displayed. The basic unit of the site is ...
0
votes
1answer
47 views

How are better exposed filters - checkboxes value - assigned

I have been wrestling with this for a number of days. I apologize if this has been asked elsewhere, I am not able to find the fix, or maybe I am just not thinking in an incorrect way to make this work....
3
votes
1answer
52 views

How do I generate taxonomy terms with drush 10/drupal 9.1.x [closed]

I'm trying to use drush to generate some taxonomy terms for a sandbox/development instance. This might be an error report by I'm a drush noob so I wanted to ask first. When I run drush devel-generate:...
0
votes
0answers
34 views

How can I migrate taxonomy data from an outdated site?

I have a site building with an old version of D8. The site can not run up and all I get is a backup sql file. So I'm creating a new D8 site with the latest version, trying to restore the data. When I ...
0
votes
1answer
38 views

Changing the layout of a Taxonomy Term Page

By default my taxonomy term page lists all articles using this term in 2-columns. I would like to change it to a 1-column layout. (1) I have created a custom display layout for the taxonomy group: (2)...
2
votes
1answer
73 views

How can I add a new field from config inside hook_update_N? [duplicate]

I have to add taxonomy by php code. Taxonomy has to got 2 fields. I added new function to test_taxonomy.install, and it seems to work: function taxonomy_update_8805() { $config_path = 'modules/...
-1
votes
1answer
26 views

How do I get the taxonomy term name?

I added a taxonomy field inside a view. I need to show the term name on the page in a grouped way, like this. taxonomy term1 name title1 content1 title2 content2 taxonomy term2 name title1 ...
0
votes
2answers
31 views

Hide taxonomy term from a view filter where the filter results are empty

I have several nodes and several taxonomies, but only some nodes have taxonomy relationships. My problem is that the taxonomy filter shows those terms too which don't have any node relationships at ...
1
vote
1answer
20 views

Contextual filter based on base level of taxonomy

I've been trying to get the following working for a couple of hours: I have a views block, it displays a single content type. The content type has a taxonomy field. The taxonomy items are structured ...
1
vote
1answer
50 views

With Commerce Product taxonomy term view, is there a way to have page title set to the translated term title?

The only way to have the taxonomy term name in the title of a taxonomy term Commerce Products view page I've found so far is the example view in the estore theme (I still don't get how tid which ...
0
votes
1answer
29 views

How do I re-create a built-in view?

I duplicated a view before making changes, but it didn't save and I'd changed most of the view settings before I realised I was working on the original. How can I recreate the standard taxonomy view? ...
0
votes
0answers
25 views

Parent terms aren't recognized

I have a term migration with an SQL source (WordPress) but the parent term is not properly set when imported into Drupal. Config: id: wp_terms_my_terms label: WordPress Terms: My Terms migration_group:...
0
votes
1answer
36 views

How to classify a view by letter?

I have tags (taxonomy terms) and created a tags pageview. I want to sort my tags alphabetically and group them by letter of the alphabet. How can I do this? Thank you I want a single page. I don't ...
0
votes
0answers
41 views

If I have 2 same name taxonomy term which is used with nodes. how to set only one instead of both?

I have 2 taxonomy terms with the same name (knight(2) and knight(6)) in my Drupal 8 Project; both terms have been used with nodes. I want to replace knight(6) with knight(2) in all the nodes. I ...
2
votes
1answer
55 views

How to limit the terms of the view to the terms used?

On the product I created a "tags" taxonomy terms field. I have created a hundred "tags". My products use around 10 "tags". I created a pageview of my products with an ...
0
votes
1answer
32 views

How do I get the term name in a custom submit handler?

In Drupal 8/9, when you create a new term, the default status message is: Created new term %term. %term contains the term name, which is linked to the term page. I want to override this and remove ...
1
vote
1answer
48 views

Get the form to add a term to a vocabulary programmatically

I am working on Drupal 8.9.6. I am trying to retrieve the form to add a term to a vocabulary programmatically. I know how to do it for a content type: $values = array('type' => $content_type); ...
1
vote
1answer
48 views

How can I update the name of a taxonomy term using hook_update_N?

I have taxonomy terms of color and I made a typo in one of the color name. It should be 'Crystal Black Pearl' instead of 'Crsytal Black Pearl'. How do I change it using hook_update_N ? Thank you in ...
0
votes
1answer
67 views

Filter views for same taxonomy term

I am using D8. I have two views (articles and videos) sharing the same taxonomy (segments). How can I filter the views based on the view type? For example, if I am on the articles page, I would need ...
0
votes
0answers
20 views

Unique Taxonomy Term Requirement Across Vocabularies

I haven't used taxonomies much so I'm hoping for a quick explanation on an issue for a site I'm working on. Let's say I have two vocabularies. Portland and Seattle. In each one I want to have a term ...
0
votes
0answers
86 views

Programmatically remove an entity reference field

I am new to Drupal 8. What I want to achieve is to delete the taxonomy term (entity reference) and its association from the nodes where it is referenced. Node has multiple languages, revisions, ...
0
votes
1answer
31 views

Content editor cannot view unpublished taxonomy terms when editing a node

We have a custom content type that has a Entity Reference field to a taxonomy vocabulary. The content editor is presented a list of check boxes to select their terms to attach to the node. Some of our ...
0
votes
1answer
23 views

Filter by taxonymy ID with multiple field in contextual filter

In drupal 8.9 I need to filter by taxonomy ID over multiple fields in the contextual filter of views. How to do this ?
0
votes
0answers
15 views

How to change image resolution on selection of field type

I am creating a Content type and added field (like: category, image etc). I want to use different resolution default image for each category. As well as I want to restrict the user to upload specific ...
0
votes
0answers
19 views

Display taxonomy parent tid of a taxonomy term reference field

On a node template , i am displaying a taxonomy term ( entity ref field ). That taxonomy term has a parent. How can have that info on the html generated , for css purposes ? The field.html.twig ...
0
votes
0answers
16 views

How to expose the URL alias of a taxonomy term in a View?

I have a View showing Taxonomy Terms as JSON, and want to expose the URL aliases of those terms: { "terms" : [ { "term" : { "name" : "Media ...
1
vote
2answers
157 views

How to get taxonomy term name/label from a field?

Ok, so I'm trying to populate a field based on the selection of a taxonomy term. I've mainly got it working thanks to this stack exchange article use Drupal\taxonomy\Entity; function ...
0
votes
1answer
166 views

How to get taxonomy term reference fields value translated in twig

I have a taxonomy vocabulary with terms. In a content type, I have a referenced field with this taxonomy. I can get the taxonomy term in twig like this : {% for item in node.field_lorem %} {{ ...
0
votes
1answer
27 views

Have a child node inherit taxonomy from a parent during /node/add?

In Drupal 7, I have two content types: Parent Events with tags (like "outdoors" or "popular" or "suitable for kids"). "Tags" are taxonomy terms in a vocabulary,...
1
vote
1answer
23 views

Why taxonomy term view is showing only a single content?

I'm working on customizing some templates on an existing Drupal 8 site. I was about to start working on the taxonomy term page but noticed only a single content is showing in it. I already checked and ...
1
vote
1answer
158 views

taxonomy_term entity loadByProperties depth not found

The terms returned contain depth as a Term object attribute. $vocabulary = 'category'; $entity_manager = \Drupal::entityTypeManager(); $entity_storage = $entity_manager->getStorage('taxonomy_term');...

1
2 3 4 5
71