Questions tagged [taxonomy-terms]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
2k views

How to retrieve a select box option and set the field's value to it?

I have a a taxonomy term select box (called "product_keyword") in a node that gets its options populated via the Reference Field Option Limit module. There are 3 other taxonomy term reference fields ...
1
vote
3answers
719 views

Get URLs of taxonomies terms in Link field

I am having a link field in drupal 8. It can accept both internal and external links with autocomplete feature. But it works only with nodes means with content but i want to use it with taxonomy terms ...
1
vote
3answers
2k views

Contextual filters in taxonomy term ID (with depth)

I need to make a view that will show me the nodes of a content type inside a node of another content type filtered by a taxonomy term. I have three content types. The first one is Projects, in which ...
2
votes
1answer
5k views

“Taxonomy with depth” view

I have a taxonomy tree like this: balls basketball color red green volleyball color red green If a Taxonomy term has children, I want to show them; if there aren't children I want to show the ...
0
votes
1answer
28 views

How do I set up an article view that validates both article and category?

I'm working with Drupal 7, and trying to get a view set up that will display blog categories and articles based on their category. The category is a Taxonomy - Blog Categories - let's assume it's: ...
1
vote
0answers
26 views

How can I restrict selectable terms in a term reference field to only show those which have been used earlier by the same user?

I have a node (type = List) with 2 fields, Term Name and Body. Body is a long text type field and Term Name is a entity reference field, which is a drop down with a list of Term in Vocabulary Vocab. ...
1
vote
0answers
18 views

Parent contextual filter

I'm using drupal 9 for a project with a large taxonomy structure. On the parent page I want to show the child terms of the node. Multiple guides i've found have suggested using the contextual filter ...
3
votes
1answer
781 views

How to show translated taxonomy terms in term listing in content listing style

I have question about translation of taxonomy terms in Drupal 8. Let's assume this configuration: New created vocabulary, vocabulary language - not specified, terms language - not specified, show ...
2
votes
0answers
15 views

Entity Validation API not invoked on saving the taxonomy overview form – misunderstanding or a bug?

I have a Constraint and ContraintValidator to validate a field of taxonomy terms. Its a hierarchical taxonomy called channel with a field field_product. It's required that a channel has the same ...
0
votes
1answer
993 views

Pathauto insert taxonomy term custom url

I have change the url of an taxonomy term. Now when i use a field with taxonomy term the url is showing like this: [node:field-taxonomy:parents:join-path]/[node:field-taxonomy:name]/[node:title] ...
3
votes
1answer
1k views

Menu Block: Expand all children of this tree - ignored?

Is anybody using Taxonomy Menu + Menu Block? I have a problem setting Expand all children of this tree, in that it seems to be completely ignored. My sidebar taxonomy menu lists all children expanded, ...
2
votes
2answers
1k views

Hierarchical select hook form alter

I have a problem with getting my module_form_alter to work for hierarchical select. I am running on Drupal 7 and my content type is called mytemp and I'm pretty sure my form-id is mytemp_node_form. I ...
2
votes
3answers
2k views

Looking for something similar to “Views selective filters”, just with “inactive” instead of “removed”

The Views Selective Filter module reduces the filter items in a views exposed filter to only those having actually results. I'm searching something similar, but I don't want to hide the options with ...
0
votes
3answers
2k views

Product category filter on the /products page

I've been looking for a while but I can not seem to find the correct way to tackle the following problem. On my products page, where all the products are, I have the standard drupal commerce ...
3
votes
1answer
863 views

Taxomony menu - show all, vocabulary link are disabled

I have a custom vocabulary which looks something like this: Shops (vocabulary name) Sporting Goods Auto Parts Computers Etc. (15 items in total, 1 level) My goal is to create a menu link to Shops ...
1
vote
2answers
2k views

Taxonomy term node count with depth

I want to achieve the following term listing: clothing (17) dresses (2) skirts (3) tops (12) accessories (5) bags (1) jewelery (4) necklaces (2) rings (2) Is this possible with views? I know you ...
1
vote
1answer
863 views

Term translations not working as View's path contextual filter

Let's say you have a taxonomy called Animals and you have terms like Dog, Cat, Horse, etc. Every term has its translation, so for example for dogs you have Hund and Chien. Now you want to make a View ...
0
votes
2answers
1k views

Display images of a specific content type in a lightbox when vocabulary is clicked

Background I am using Drupal 7 and I have a taxonomy "Kitchen Type" and content type "Kitchen Picture" having default field_image for images. There are three Kitchen Types Traditional, Contemporary ...
4
votes
2answers
4k views

How to translate taxonomy terms displayed via an exposed filter in views?

I'm using the Views, i18nviews, and Entity Translation modules. All of my terms have already been translated using Entity Translation. In views displays, the translated terms appear in the correct ...
0
votes
1answer
604 views

How to fix error Undefined index: parent in taxonomy_form_term_submit()?

I got below error on my site recently. Notice: Undefined index: parent in taxonomy_form_term_submit() (line 829 of /var/www/Sites/xxxxx/modules/taxonomy/taxonomy.admin.inc). I google it and find ...
4
votes
1answer
1k views

How to set a default value for Simple hierarchical select?

I tried to implement hook_form_alter in order to pass default value to Simple hierarhical select views exposed filter. function mymodule_form_alter(&$form, &$form_state, $form_id) { $tid = ...
0
votes
1answer
1k views

Taxonomy terms with conditional field

50 terms and each term needs to have radiobuttons or "other". Food - o in price - o extra price Drinks - o in price - o extra price WiFi - o in price - o extra price So "in price" and "extra price"...
10
votes
19answers
16k views

How do I delete all terms from a vocabulary (bulk delete)?

I have a large vocabulary, and admin views does not yet work for taxonomy. Taxonomy Manager does not do this as well. Are there other options for bulk-deleting taxonomy terms?
0
votes
1answer
660 views

Migrate multiselect taxonomy values from node with csv

I want to import companies with csv into Drupal 8 with migrate_source_csv module. CSV: company_name,company_categories,company_size "Dummy Name","Category 1";"Category 2","2 people" How to ...
0
votes
1answer
5 views

alter query view by adding fields in an andGroup within an orGroup

I have a multilanguage site with two languages: English and Dutch. Not all nodes are created in both languages. Some nodes even have no language ('und', 'zxx'). I want the default Drupal provided ...
4
votes
2answers
2k views

Give a role permission to add and edit their terms in a taxonomy

In Drupal 7 I am trying to give users the ability to add terms to a taxonomy and then edit only the terms they have created. I'm using the Taxonomy access fix module to give users permission to add ...
0
votes
3answers
2k views

How to get term by path or alias?

I've seen this question posted many places, but no answers - or relevant answer. i.e. how to get term object or ID from path or alias e.g. /cat/subcat or /taxonomy/term/6??
1
vote
2answers
23 views

Conditional Show/Hide Child Terms on Edit Page

I have a content type with a term reference. The terms have child terms. On the admin editing side, I want to show only top level terms until selected, then show only the child terms for that parent. ...
0
votes
1answer
421 views

Export and Import Taxonomies and Extra Fields

I created extra field in Login Form, I Installed even Extra Module (address) and create Taxonomies Now I want to Export these configurations to another Drupal. This Drupal is the Clone of the main ...
2
votes
3answers
894 views

How to hide specific term/field value on the node?

Is there a way to hide a specific taxonomy terms (specific field values) on the node? (not hiding field/vocabulary altogether, just some values). For instance, there is vocabulary "Location" with a ...
2
votes
1answer
802 views

Tell taxonomy links to use route in custom module

I have a module where I created a route /page/tag/{term} that uses a controller for modifications to how the term page is handled. The problem is that when any page displays these term links, they ...
-1
votes
2answers
2k views

creating child terms from a parent using fields

For a project i would like to achieve the following: Using 2 fields in a content type field_parent = reference to term This field references to vocabulary 'parent terms' I have a second field ...
-1
votes
0answers
28 views

Add new default value to existing content type

I'm currently on the latest version of Drupal 8. I have a content type (News and Articles) which has a field (Category), a taxonomy term reference field. When I first created this content type I added ...
0
votes
1answer
390 views

Is it possible to disable (or reject) selection of parent terms in taxonomy reference fields at node creation or edit?

for instance, for a particular Vocab. and User Role.. Is it possible to achieve that in code? That parent terms will be rendered only as labels and not checkboxes? Thanks.
0
votes
2answers
288 views

Making landing pages with taxonomy

I'm trying to make about 100 landing pages using taxonomy. I'm trying to stick to Drupal 8 core features as much as possible. I created two taxonomy vocabularies, Places and Main keyword. Now, what ...
1
vote
1answer
663 views

Display parent term based on child term in views

I have a vocabulary with the following structure: Vocabulary Parent term 1 Child term 1.1 Child term 1.1.1 Child term 1.2 Child term 1.2.1 Parent term 2 Child term 2.1 ...
0
votes
1answer
57 views

How to get fields definitions of a vocabulary in drupal 8/9? [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
9 views

How to display content tagged with child terms in views?

I have a taxonomy vocabulary general in which I have a reference field to user roles allowed_roles. I have two taxonomy terms. A and B where A is the parent of B. Now I selected test_role in the A ...
0
votes
2answers
419 views

Taxonomy filter exposed to user that dynamically only includes terms attached to currently published content

Background: a) Taxonomy: I have built as site that allows users to tag content of a particular content type with tags. The system started with a pre-existing taxonomy before any content was added, ...
2
votes
1answer
397 views

Better exposed fiters with Views: how to show quantity of nodes tagged with certain term?

I use better exposed filters with views. I chose to show field "term reference" as hierarchical checkboxes on my exposed filter. It works great. But now I need to add quantity of nodes having certain ...
0
votes
2answers
1k views

How to add a custom field to a taxonomy term

I am developing a module and I would like to know how to add a field to a taxonomy term? My section is named special and I want to add terms in this section I have this code: function add($form,&...
3
votes
2answers
453 views

Custom Path Alias with Initial Letter as Token

For various reasons, I need to change my custom path alias for a taxonomy type as follows... FROM: /composers/aardvark TO: composers/a/aardvark So I'm looking at either creating a custom token, or ...
1
vote
1answer
508 views

Assigning permissions based on taxonomies

I have a hierarchical taxonomy that looks like this: School>Class>Project That is you could have a project that is part of a certain class that is part of a certain school. I would like to make it ...
1
vote
1answer
427 views

how to get all options values of simple hierarchical select in drupal $form?

i have writed this code to unset empty terms : function shs_selective_form_alter(&$form, &$form_state, $form_id) { if ($form_id == 'views_exposed_form' && $form['#id'] == '...
0
votes
2answers
564 views

How do I validate the term title in hook_taxonomy_term_presave()?

How do I validate the term title in hook_taxonomy_term_presave()? Is there a way to proceed with the validations in hook_taxonomy_term_presave()? @Edit I rendered taxonomy add term form via "Inline ...
1
vote
0answers
38 views

Facets with 40000+ taxonomy terms make page load slow

I am running Drupal 8.8.1. I have Search API Solr 8.x-2.2 and Facets 8.x-1.3. I have 40,804 taxonomy terms. I added this taxonomy term in my solr index as string. I already have a view page . I added ...
0
votes
1answer
31 views

Create a View Block that shows a taxonomy vocabulary applied to the current node

I have a news section of a Drupal 8 website that contains an ever-growing list of nodes. To avoid a messy menu in the long term, they do not have a menu position assigned but instead are shown via ...
1
vote
1answer
673 views

How to display custom fields of taxonomy in field twig

In my content type for Event, I have an entity reference called Speakers which refers to a taxonomy called Team Members. It's set to multiple so I can say which speakers belong to my event. On ...
0
votes
0answers
10 views

Unable to use pathauto aliases for taxonomy terms in conjunction with views pages

I'm trying to set up pathauto aliases for a number of vocabularies to work alongside corresponding view pages. However, in doing so, I'm running into a 404s ("The requested page could not be ...
0
votes
1answer
433 views

Taxonomy terms with associated nodes: display page by page navigation in node page?

Hi i have a content type called Product and have fields(title,description,code,image) and also have vocabulary categories like below formate parent term 1 -child term 1 --sub child term 1.1 ...

1
2 3 4 5
71