Questions tagged as ['taxonomy-terms']
I want to create a two step entity reference selection in Drupal 9.
The structure so far:
Content Type: Company
--> Entity reference: Jobs (multiple)
Content Type: Job
--> Entity reference: Qualification (multiple)
Content Type: Qualification
I created an import for the company profiles and there is a entity reference for multiple jobs. This is already working.
In a second step there should ...
I have a multilingual website with taxonomy vocabulary, which terms are not translatable (company names).
But each term has translated meta tags and paths, depending on the selected site language.
For example, term paths:
- /vocab-name/term-name (default, english)
- /de/vocab-name/term-name
- /es/vocab-name/term-name
- /it/vocab-name/term-name
- etc
I can access all of them, metatags are displayed in the c ...
I have a site with Drupal 9. I have created a taxonomy and I want to personalize the terms pages. In Drupal, there is a view for that, but if I change it, I change all the taxonomy term pages.
I want to create a view to customize each page of the terms. How can I achieve this?
On my Drupal 9 site, I created taxonomy terms in the "tags" vocabulary (the vocabulary and the default field of the "article" content type) :
When I create a node, I select a taxonomy term in the form (for example "ICO"). The node displays the "tags" field :
I want that if the node has the term "ICO", it also displays the parent terms. Like this :
Catégories : Culture geek, crypto, ICO
How can ...
I have a view_block with the following filters,
I want to change the product tag, Release tag, Document type values dynamically based on url.
if the url is, example.com/mars/21.43.00/ProductGuide
, then the filters should change like this
I don't know how to achieve this, any suggestion would be helpful
Thank you!
I am working with books in drupal 8. I want to display a specific page("table of contenets") on the sidebar whenever any page of that book is accessed. "table of contents" is a book page. every page of book has two id's.
- page_id
- book_id
Page_id is unique for every page but book id is same for all pages. I believe contextual filter based on book_id might solve my issue. but I don't know how to add c ...

I am currently a caretaker for a Drupal 7 website and I can't figure out how to group paragraph items in views. I have created a content type Products and one of the fields is called product variation which is field type paragraphs. I have created a paragraph bundle for that field.
Then I created a view to show the products on the front page. To display the paragraph fields I created a content re ...

I have a lot of different vocabularies. On The taxonomy page (the standard view provided) I would like to add a block (view) that takes the current taxonomy id from the url/page and displays all taxonomy terms belonging to the same vocabulary. I tried adding a contextual filter, but when I choose term id from url, the view only shows one term, but I would like to show all terms of the vocabulary the ter ...
There are two types of content (as an example):
- fruits
- vegetables
They share the same vocabulary and similar terms. Catalog structure:
-Fruits
--juices
---for children
---for men
---for women
-Vegetables
--juices
---for children
---for men
---for women
Url path for mango: /fruits/mango
I want to show similar vegetable juices for children in the fruit node, if the path matches the difference only wi ...
English is not my first language, so please be patient.
I'd like to ask for assistance to split my taxonomy terms in two facet filters.
Context:
- Drupal Core v9.2.6
- Acquia Search v3.0.5
- Acquia Connector v3.0.4
- Search API v8.x-1.21
- Search API Solr v4.2.1
- Search API Pages v8.x-1.0-beta3
- Search API Solr Admin v4.2.1
- Facets v8.x-1.8
I have configured correctly the listed modules and set a functional Search ...
I'm on D9 and already using entityqueue module to let the content editors orders some views via "simple" queues
Now, I've been requested to make possible to order the nodes appearing on the terms' pages of a specific taxonomy.
Those pages - on /taxonomy/term/%
url - are rendered trough the "standard" solution of a view of content with a contextual filter "Has taxonomy term ID".
I've successfully tried ...
I created a vocabulary for the nodes.
I installed the Easy Breadcrumb module.
When a node is tagged, for example, with Crypto and ICO, the breadcrumb should be the following one.
Accueil >> Crypto >> ICO >> Node Title
Home >> Term >> Sub-term >> Node Title
Nodes will only have a single term or a term and a sub-term.
Currently it does not work.
I also i ...
I created a content type with a taxonomy. I use the terms of the taxonomy as a category for a handbook to show different categories via views. Now, I have a section of the handbook, which should only be visible for one role. I thought I could realize this with the Permission by Terms module.
So, I gave access to this one term just to a specific role. The access to a node with the term is denied f ...
Hi team i have some isssues.
I'm creating a node and i would like to set a content reference by name not by id, i'm doing this but this is not working: 'field_content_type_items' is referenced to another content type
$node = \Drupal\node\Entity\Node::create([
'type' => 'items',
'status' => $status,
'title' => $title,
'field_content_type_items' => "CUN",
]);
Also i tried with ...
The goal is to create a view to list users on a page with url /search/[category]/[topic]/[location] where "category" "topic" and "location" are taxonomy fields in nodes that users can create.
I want to list all users that have a node were the "search" queries apply.
/search/all/all/all should list all users
/search/all/topic1/all should list all users that created at least one node with topic "topic1 ...

I have a view page (articles), with a taxonomy term relationship for the tags vocabulary. I have no context filters, and the filter criteria are the following.
- Published
- Type: article
- Taxonomy term (exposed) (with relationship "term", "tid" ID, no multiple choice, operator "one of", but I've also tried "all of" with no use)
At first, the article list on page displays correctly, but when I select tag ...
I have a webform with an entity reference to a taxonomy and it's using an autocomplete widget. When I edit a webform submission, the ID is missing from the field and changes can't be saved because the value is invalid without the taxnomy ID.
I can't find any kind of reference to this issue anywhere.

For our new Drupal 9 (or 8 if necc.) website we require a very fine controllable access structure where we can give and restrict access on a user by user basis. Not only for a content type but also for the paragraphs (or more atomic components of a page). With Tac Lite we can already set the permission via taxonomy terms on a user bases to view a node. But now we would like to also controll single parag ...
I'm displaying a list of taxonomy terms in a narrow column. Some of the names are too wide to fit and wrap. I thought perhaps inserting a <wbr>
in the name would solve this, but the tag is just printed out as a literal. Is there a way to use rich text in taxonomy term names?
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 local development environment to generate content). However, some of our default content are items like vocabulary terms which are then related to the node. But this is no longer exporting the ID, so the ID ...

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 "organisation".
On the front page, I put a "view block" to list all the "categories", therefore I can browse all the jobs related to a specific category.
On the organisation node, I put another "view block" to list all the "categor ...

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() === 'taxonomy_term' && $bundle === 'my_taxonomy_type') {
kint($fields['name']);
if (isset($fields['name'])) {
kint('found name');
}
}
}
When I rebuild the cache with drush,

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 anapples
group.) - The same user cannot make two groups with the same name (User A cannot make two
apples
groups.)
How can I implement this?
D8/9 offers a field constraint as explained in this answer and this blog post, but this makes a field ...

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 nodes using the same taxonomy term.
How can I achieve this?
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 region is selected, is there a way to only to shown in Country all the related terms as shown in the screenshot?
The project page for the Views Reference Filter module says, at the bottom:
By default, the vie ...
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 'Part of a site' and every category term has selected 'Part of a site' term)
Both Vocabularies are using in Node as Field 1, and Field 2.
But it is not convenient now to choose Cetegory term because categor ...
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();
foreach ($query as $nid) {
// …
}
I need to know whether a taxonomy term has been added to a node. I don't need to know the name or ID of that term, which is a taxonomy term from the Group Requ ...
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 display the list.
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.
What does the field.field.node
look like?
What does the field.storage.node
look like?
Are there special names for the widgets for core.entity_form_display
and core.entity_view_display
?
Thank you

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 practice to have one block that can be placed on multiple nodes to pull relevant data from a JSON endpoint, on another server, rather than have a proliferation of one block for term.
Example endpoint ...