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
1answer
31 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 ...
2
votes
1answer
604 views

Is it possible to disable taxonomy hierarchy?

The site I am building uses fields (plus a custom module) to provide a richer set of relationships between taxonomy terms than the built-in hierarchy allows. I want to remove/disable the built-in ...
4
votes
2answers
868 views

How to import taxonomy from Json format

I have taxonomy in Json file. I need import this file into Drupal into exist vocabulary.how can I import data from Json file to exist vocabulary?
2
votes
0answers
228 views

How do you correctly filter on taxonomy terms to get all nodes matching term or parent term?

I have a vocabulary (channel) with two levels. An article node can be added to the first or second level (via field_channel). The hierarchy looks like: channel-1 subchannel-1.1 subchannel-1.2 ...
0
votes
2answers
2k views

Show subterms in a page

I have two categories and each one has subcategories. I put the parent categories in a menu. What I need is: when I click a parent category its subcategories should be shown in a new page. How I ...
3
votes
1answer
2k views

How can I show only first level terms on a dropdown taxonomy exposed filter?

I have a 2 level taxonomy tree: Countries and cities. I also have a view of content, all of which are marked by first level terms (countries) of that vocabulary. My taxonomy tree is like that: ...
0
votes
1answer
563 views

How to remove a term programmatically from entity reference field using entity browser on translation form?

I have a content type "Articles", this is a multi-language site, by default the content is created in English, and then translated into Spanish. On new article in English, I set a title and a term for ...
4
votes
3answers
953 views

Building a search View that respects access control

I'm implementing search on a site using taxonomy access control with search api and search api solr. Reading the help page node access section, I see: Needs details on how to build a View that ...
0
votes
0answers
47 views

Display the fields of the current taxonomy with an exposed form

I'm using the Taxonomy term view. I expose the "Has taxonomy term" filter to my users in a block. I want to display the title and the fields of the current taxonomy even when a term has been ...
0
votes
1answer
42 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 ...
1
vote
1answer
698 views

How can i display child terms under parent terms and assigned articles using entity field query?

Hi i have one content type with two vocabulary term references one is called category and terms is A,B,C like the 2nd one resources it contains parent with child terms like below hierarchy Resource ...
0
votes
1answer
769 views

How do I add icons to taxonomy terms?

I have a sample site running Drupal 8.1.x, I want to add icons to the taxonomy term. Example. I have a term called Animals with the following list in it Cats Dogs Fish i want to assign an icon ...
1
vote
1answer
738 views

how to filter blog posts by taxonomy and by year

I have been trying to build a filter fuctionality for blog posts. I would want to filter by taxonomy terms and by the year the post was published. So basically in the content I want to list all blog ...
0
votes
0answers
27 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
1answer
644 views

Merge multiple block views to a single jump menu

I want to implement a jump menu with a list of three different vocabulary terms grouped by each vocabulary name. If I make only a single view all the terms are shown correctly but I would like to be ...
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 ...
0
votes
1answer
522 views

Order nodes based on entity reference filter

In my Drupal 7 website I have an A content type with an entity reference 'parent' field which I use to link to nodes of a B content type. I have to implement a way to sort A nodes basing on their B ...
-1
votes
2answers
615 views

How to create parent child menu programatically?

I have an array like this : Array( [0] => Array( [link_title] => Level == bod [link_path] => link1 [menu_name] => parrent-child-menu [weight] => 1 [expanded] => 1 ) ) Array( ...
2
votes
1answer
124 views

Redirect After Creating New Taxonomy Term

I am new to Drupal. I am trying to figure out if it is possible to redirect back to the Taxonomy page right after adding the new vocabulary term instead of being directed to the manage page of the ...
0
votes
2answers
553 views

How to link taxonomy term with current loaded NID?

I want to link taxonomy term with current loaded node I am using $nid = arg(1); $term=taxonomy_term_load($tid) print $term; but noting happened. Please tell what is the correct way
2
votes
2answers
1k views

How to get child terms based on parent terms between two different taxonomies

I have created two vocabulary Program Topics I want to load the topics based on the program selection. It looks like category and subcategory. I created some program like java, .net, PHP and I ...
3
votes
1answer
506 views

How to automatically modify a field after saving content?

I have posted this question on drupal.org (via a comment titled "field modification triggered by saving action"), but I realized that the thread is more than five years old. So I reproduce here the ...
0
votes
1answer
28 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
1answer
496 views

How to update taxonomy term of a node using services

I have created a new node using Services 3 module successfully, the code is below { "type":"page", "title":"New test page", "taxonomy": { "tid" :"367928" } } Configuration: Drupal ...
0
votes
2answers
977 views

How do I display taxonomy child terms?

I used the Taxonomy View Depth module to create a taxonomy vocabulary like this. Animal Cats Brown white Dogs Brown White What I did was enabling the default taxonomy view, and changing the ...
1
vote
2answers
53 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,...
3
votes
1answer
589 views

Autocomplete term widget (tagging) - Insert as child

Is there a way to insert taxonomy terms as child of a parent term with the auto complete term widget? I have found several modules such as "Content Taxonomy" or "Hierarchical Term Reference ...
2
votes
1answer
1k views

How can I add multilingual taxonomy breadcrumbs?

I have a site with two languages and a large number of taxonomy terms. I want to use breadcrumbs on my taxonomy pages, but I can't find a system that works well with multiple languages. I translated ...
2
votes
1answer
747 views

Term lineage in simple Hierarchical select module

I'm working on a project using Drupal 7. I'm using simple Hierarchical select module. How its possible to attach the parent lineage to the node? Is there any way to do so using simple Hierarchical ...
0
votes
1answer
58 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 ...
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 ...
3
votes
1answer
2k views

Taxonomy-term based block display

I'm trying to display certain blocks in taxonomy term pages and the nodes associated based on the taxonomy term itself. Let's say I have 3 taxonomy terms: Bologna, Milan and Rome. When I'm in ...
0
votes
2answers
2k views

Adding multiple taxonomy terms to a node via code

I've been editing nodes in code (Drupal 8) like so: $node = \Drupal\node\Entity\Node::load($nid); $node->body->value = $body; $node->title->value = $title; $node->taxonomy_field->...
0
votes
1answer
1k views

How to get the vocabulary terms for the current language

How do I programmatically get all the terms within a vocabulary for the current language? This is a similar question to Get translated term name, but not for a single term, but for the entire tree.
2
votes
1answer
672 views

Taxonomy term name alias in taxonomy term autocomplete

I'd like to have two or more names for one Term-ID in my custom taxonomy dictionary. As for now I've added a custom field and named it "Synonyms". The field can have multiple values. How can I ...
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->...
7
votes
2answers
6k views

How do I theme a taxonomy term page?

I am working on Drupal 8, trying to get a page template for each vocabulary. I have tried using hook_theme_suggestions_HOOK_alter() to achieve this, but I was not able to do it. I tried using Devel ...
3
votes
2answers
2k views

Views autocomplete exposed filter

I am using autocomplete exposed filter in views for country/city with depth which is working fine but there are many identical city names. When user types XYZ he sees 2 entries: "XYZ" "XYZ" and has ...
2
votes
2answers
2k views

How to display list of nodes that share the same Parent taxonomy term as current node

I have a vocabulary set up called (for example) "Produce". And it has parent terms like "fruit" and "vegetable". Child terms are like "banana", "apple" and "cucumber", "squash". Whenever I create a ...
1
vote
1answer
605 views

Strange Issue with displaying information of the current term

I have built a series of views to build a Drupal Commerce display for products based on the Taxonomy terms of those products. These terms have a hierarchy. There are nearly 40,000 products being ...
2
votes
1answer
750 views

How to change order of taxonomy terms related to specific node field?

As in question. I have multivalued taxonomy field. Is this possible to control terms weight, which are belongs to specific node field? As a term weight, I mean weight inside single node. It's just a ...
0
votes
1answer
780 views

When adding Content: has taxonomy term id contextual filter to view and check specify validation criteria box, why don't I see validation options?

My request is closest to these two questions: Filter by multiple taxonomies in URL Views contextual filters taxonomy name I have a view which is a page and displays node titles in a table format ...
2
votes
2answers
1k views

How can I apply different templates based on taxonomy hierarchy?

I'm new to Drupal and I don't have extensive knowledge so I'm hoping I can get this question answered. I want the taxonomy pages of lower hierarchy to be displayed differently from the higher by ...
1
vote
1answer
451 views

How to use Views PHP get Taxonomy field value and field collection value?

I am currently using Views PHP module to use Field Global PHP to render view value, but I dont know how to read taxonomy field value and field collection value, did anyone know how to do it?? Beside,...
5
votes
4answers
6k views

Create taxonomy terms on the fly

As far as I know, the way to create a taxonomy term is having to go into the taxonomy module and creating on there, and THEN assigning the term to the node. Is there a way to create taxonomy terms on ...
0
votes
1answer
24 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 ...
2
votes
1answer
1k views

Show parent items in hierarchical facet display

Taxonomy terms are configured as such: Parent category 1 - Child category 1 - Child category 2 Parent category 2 - Child category 3 - Child category 4 "Empty facet behaviour" is set to "Do not ...
1
vote
1answer
2k views

Search API and Facets API with multilingual taxonomy

I have some taxonomy terms and the settings look like this. All these terms have been translated. After indexing the content with Search API and Facets API, the facets are not shown with translation....
1
vote
2answers
340 views

How to display registration form fields based on the taxonomy term?

I have three taxonomy terms. And I want to display different fields in the registration form based on the taxonomy term. I want something like this. taxonomy term 1: Registration form fields: Name, ...
4
votes
3answers
1k views

Different view page based on taxonomy depth?

I'm wondering if there is a way to show a different view (or view part) based on the current depth of the term level? Example I have a bunch of categories and subcategories. For the categories I want ...

1 2
3
4 5
71