Questions tagged [taxonomy-terms]

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

Filter by
Sorted by
Tagged with
-3
votes
0answers
26 views

best practice for Multiple subscription content access [closed]

A common need is to sell multiple content under one product name; For example, selling a course in Drupal that contains several lessons; This scenario has many applications. In my case, a site that ...
-1
votes
0answers
17 views

Adding a taxonomy term programmatically in a view displayed on a node [closed]

my problem is this: I have a view that displays a vocabulary of taxonomy terms, the view is displayed on a node. I need to add another term programmatically to the vocabulary based on some of the node ...
2
votes
0answers
24 views

Creating default content on site install with related entities

We use the Default Content module to install default content on each new site of our multi-site Drupal platform. Version 2 changed to only use UUID of the content you are exporting (done from the ...
0
votes
0answers
12 views

One Taxonomy with multiple views to show content related to a specific term and referenced content

I have two content-type: Job Organisation and a taxonomy: categories The content type "Job" has a field referenced to "categories" and another field referenced to "...
2
votes
2answers
57 views

How to set a validation constraint for base fields like the taxonomy term name?

I'm having trouble setting a validation constraint on the name of the taxonomy term. function MYMODULE_entity_bundle_field_info_alter(&$fields, $entity_type, $bundle) { if ($entity_type->id() ...
5
votes
2answers
62 views

How to make taxonomy term names unique per user?

I have a taxonomy vocabulary, Groups. Requirements Different users can create groups with the same name. (User A can make an apples group, and User B can also make an apples group.) The same user ...
1
vote
0answers
39 views

How do I display nodes of two different content types that use the same taxonomy term?

I have two content types, typeA and typeB. Both the content types have a taxonomy reference field. I created a view for each content type. In the view showing typeA nodes, I want to show also typeB ...
1
vote
0answers
21 views

Taxonomy dynamic dependent exposed filters

I have a content type with two taxonomy term fields: Region and Country. I created some nodes and entered values for those fields. I created a view with both the fields as exposed filters. When a ...
0
votes
0answers
11 views

Display in f2 only terms related to selected term in f1

I have a site that consists of a few parts like: Cosmos, Hi-tech, Travel, Music. Each part has its own Categories. And I have made two Taxonomy vocabularies: Part of a site Categories (this has field ...
0
votes
0answers
36 views

Scientific taxonomy tree using taxonomy

I'm looking to create website that has a functional scientific taxonomy tree. There will be about 2000 species that span hundreds of genus and many families, classes, orders, subphylum and phylum. ...
1
vote
1answer
45 views

Programmatically verify a taxonomy term has been added to a node

I'm currently checking the node type and status, using the following code. $query = \Drupal::entityQuery('node') ->condition('status', 1) ->condition('type', 'content_page') ->execute();...
1
vote
0answers
28 views

How do you add a CSS class if the default field value is chosen?

How do you identify that the default taxonomy field choice has been chosen? Solution consists of a taxonomy list. If the default is chosen the title in the display should be hidden. Using views to ...
1
vote
0answers
34 views

Programmatically add a taxonomy field to a custom content type

I'm familiar with adding fields to a custom content type in the yaml files of the module. I'm unable to find an example of how to add taxonomy fields to a content type at programmatically at install. ...
0
votes
0answers
28 views

Pass parameters from block to a JSON endpoint using taxonomy term from URL

I've been searching for a solution to being able to pass a taxonomy term on a views block that is on a given page using the term name that is in the URL. I agree with my team that it would be a best ...
0
votes
0answers
10 views

Views Jump Menu containing only sibling taxonomy terms

I'm using Views Jump Menu with Drupal 9. Nodes are tagged with a software_version hierarchical taxonomy, following this pattern: ├── foo │   ├── 0.1.0 │   └── 0.2.0 ├── bar │   ├── 0.3.0 │   ├── 0.3.1 ...
0
votes
1answer
18 views

Node url alias pattern based on taxonomy not working properly

I have taxonomy named Category with two terms: News and Articles. Articles term has custom url alias - /useful. The website was upgaded from D7 to D9. On old D7 version node url pattern was [node:...
1
vote
0answers
13 views

How to save contextual filters (taxonomy) used with one content type to another?

I'm quite new to Drupal and I'm building a site where the user will be able to filter content using taxonomy (for example location, price range free/cheap/expensive,etc.). I want this filter to be ...
0
votes
1answer
59 views

Display Block to retrieve information from Order Item's Product Variant and display rating & review inside product page

I am working on an e-commerce website development. I have the conventional Products -> Product Variants which goes through Order and payment gateway workflow. However, there is something different ...
2
votes
1answer
47 views

Pathauto alias full path for hierarchical taxonomy terms

My client has content tagged by a hierarchical taxonomy of arbitrary depth. Currently the maximum depth is three, but that could change: ParentTerm └── ChildTerm └── GrandchildTerm Each Term has ...
-1
votes
1answer
23 views

Taxonomy term relationships

I have 3 taxonomy terms that I would like to expose as filters but I would like to use JavaScript to disable filters as you make selections in the other related exposed filters. For example: Styles ...
2
votes
0answers
32 views

Add an image to a vocabulary

I need to add an image to a vocabulary, not the taxonomy terms. Essentially, I need to add a field to the "Edit Vocabulary" page. Is there a way to do this?
2
votes
1answer
27 views

Taxonomy term save very slow

I have a vocabulary with around 15k+ terms in multi-level hierarchies. Recently I noticed that with this amount of data, when I try to save a term of a higher level (parent to many), it takes a lot of ...
0
votes
0answers
15 views

Drupal 7 taxonomy term fields not handling content filters

Image Resize Filter doesn't work with taxonomy term description. Resizing works fine in nodes and blocks, but not in views for taxonomy term. I'm loading term in my view template. And render its ...
1
vote
0answers
12 views

Geolocation Geometry (Geometry) field cannot be edited in taxonomy term

I have a taxonomy type with Geolocation Geometry (Geometry) field type. I use custom Geolocation Geometry Lat/Lng to WKT widget (but the problem occurs with other widgets too). The problem is that ...
1
vote
0answers
16 views

Cannot view taxonomy terms for one vocabulary

I'm running core 8.9.16 (and have run database updates) and have 24 vocabularies. One is giving me an error when I try to list terms, the others are fine. This seems to have happened when I updated to ...
0
votes
1answer
5 views

LIKE operator to load taxonomy term

I want to retrieve a taxonomy term using this line: $term = $this->entityTypeManager->getStorage('taxonomy_term') ->loadByProperties(['myfield' => 'mytext']); How can I rather use ...
0
votes
1answer
20 views

The view doesn't display products

I've edited the default product type and added a taxonomy term reference field and added some products that reference my product categories. The default taxonomy view isn't display my products, I ...
0
votes
0answers
14 views

Problem with a taxonomy view with Drupal Commerce products with multiple categories

Under Drupal, 9 I've set a Drupal Commerce site where the products can have different categories. For example, having a vocabulary like this: Category A Subcategory A1 Subcategory A2 Category B ...
3
votes
0answers
31 views

Pre-select a checkbox from an exposed filter

I have a view that lists blog articles. The blog content type has a taxonomy reference field to the 'tags' vocabulary, authors can select 1 or multiple tags. The view exposes the 'Has taxonomy terms (...
1
vote
0answers
35 views

Why doesn't breadcrumb work for taxonomy terms?

I have created url patterns for the taxonomy terms in the "Article category" vacabulary. I want the breadcrumb trail to look like this: "Accueil"> "Blog"> "...
0
votes
0answers
26 views

Display products related to a content type through a vocabulary

I have different product variations with a vocabulary (Artist) which is also used for the Artist content type. How can I use a view to show the related products which use a specific value from that ...
0
votes
1answer
43 views

How do I use a term as contextual filter correctly?

I'm using Drupal 8. I have a book content type that uses a vocabulary called "book type" as an entity reference field. I have basic page content type which also uses the the vocabulary "...
-3
votes
1answer
16 views

Attached all images from taxonomy in view

I am creating a view of a content type and content type is linked with you to taxonomy with has images. Now, i have added Relaionship as well. But now if my node is attached to muliple taxmony term it ...
1
vote
0answers
21 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 ...
0
votes
1answer
30 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
31 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. ...
2
votes
0answers
23 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
14 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 ...
1
vote
2answers
39 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. ...
1
vote
0answers
67 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 ...
1
vote
1answer
64 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 ...
0
votes
0answers
15 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
0answers
44 views

Alter breadcrumb for the taxonomy term edit page

To ease the navigation in the administration theme I would like the breadcrumb of /taxonomy/term/ID/edit To be : Home | Administration | Structure | Taxonomy | TaxonomyName | TermName | Edit Rather ...
-2
votes
1answer
60 views

Country code in taxonomy shown as flag

I am using ISO 3166-1 alpha-2 codes for countries as a taxonomy in several pages of a given type. When listing those pages in a view, I would like to display the corresponding country flag, rather ...
0
votes
0answers
11 views

How to get a multilevel taxonomy reference field to output as nested UL in node tpl?

I have a simple 2 level taxonomy vocabulary field but I can't seem to find a way to output the terms (labels) in a nested UL in my node TPL. There are no display formatter options at all and I can't ...
1
vote
1answer
25 views

Newbie Taxonomy and Content Question

I'm new to Drupal (having used Perch CMS and PHP for years). Forgive me if I bumble the terminology a bit. I've been furiously going over documentation and tutorials. Sorry in advanced for being ...
-1
votes
1answer
47 views

Is there anyway create relationship for filter criteria which has vocabularies( state, city and location)?

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
2answers
203 views

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
195 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
53 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 ...

1
2 3 4 5
72