Skip to main content

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
0 answers
11 views

How to show child term on click of parent term in facet?

I am using facets and I need one facet with Parent term taxonomy and when clicking on one parent term, another facet to appear with the children of the clicked parent taxonomy term. Show child terms ...
latikas's user avatar
  • 500
0 votes
1 answer
34 views

Avoid vocabulary revisions

it seems to me that it's not possible to fully avoid revisions in taxonomy: even if I uncheck "Create new revision" for a specific vocabulary, one revision is always created for each term, ...
Nene's user avatar
  • 13
-3 votes
1 answer
59 views

Default taxonomy view doesn't show fields

I am trying to change the default taxonomy term view to include Fields instead Content (teasers) but I get this error: Display "Default" uses fields but there are none defined for it or all ...
lahiente's user avatar
0 votes
0 answers
107 views

Some taxonomy term pages don't include all nodes

PHP 8.1.29 10.6.18-MariaDB-cll-lve-log 10.2.6 Drupal core with no PHP customization. Taxonomy term view is 100% default without changes. Some taxonomy term pages don't include all nodes; they include ...
user114794's user avatar
0 votes
0 answers
95 views

DivisionByZeroError PHP error

I keep getting the following PHP error on a Drupal 9 site that I'm working on that seems to be initiated by the tags taxonomy. I create an article and if I don't add tags it works fine. If I do add ...
Zach Rodimel's user avatar
0 votes
0 answers
21 views

Contextual filters with taxonomy

I have built a normal view with a contextual filter on a taxonomy term: This taxonomy term consists of 6 terms, with four terms the call of the view works without problems and with two terms I get ...
Bavramor's user avatar
1 vote
2 answers
67 views

Which template to override to change the markup of a reference field to taxonomy and how to get term fields values in that template?

I have a node that has a reference field to the taxonomy vocabulary. In the Manage display of the reference field, the Rendered entity format is selected, and the view mode (field_image field display) ...
nathan111777's user avatar
0 votes
0 answers
22 views

How to add taxonomy and menu to content Mirgation using migrate, migrate_tools, migrate_plus and migrate_source_html?

I am new to Drupal and Would really appreciate the help I am importing html pages using migrate, migrate_tools, migrate_plus and migrate_source_html it is working but I would like to also populate the ...
user avatar
0 votes
0 answers
59 views

How to retrieve taxonomy term name in url instead of id in a drupal view?

I'm currently working on Drupal 10 and utilizing Views with filter criteria. However, when I apply filters to my view, it shows the ID of the taxonomy term instead of its name. How can I ensure that ...
lucia's user avatar
  • 1
-3 votes
1 answer
62 views

Can I put taxonomy tags in a block and if I can, how to prevent them from appearing in a field of a node?

Having the taxonomy tags in a field of a node in the main content block of the Content region, is a problem for me, as I would prefer having them inside a block so to better choose where they appear. ...
heya's user avatar
  • 1
0 votes
0 answers
27 views

Is there a method to get a view to provide multiple tags in a CSV export within one column rather than mulitple rows?

I have a D7 site that is being recreated. I need to generate a CSV of particular fields used in its numerous content types. There are 5 taxonomy reference fields. I have created a relationship for ...
JAyenGreen's user avatar
0 votes
1 answer
84 views

Relationship between taxonomy field and other fields within a content type (recipe example)

I'm looking to implement a recipe content type, in which the ingredients are chosen from a taxonomy list using the reference field; and the amount of each ingredient varies and added manually per ...
user1895's user avatar
  • 103
-1 votes
1 answer
93 views

How to add a prefix to all taxonomy terms of a given vocabulary?

I wish that any term will have a prefix like articles in the topic of so to get: Articles in the topic of term. How to do that?
termer's user avatar
  • 1
1 vote
0 answers
27 views

Commerce Kickstart "Add product" does not give option to assign it a product catalog

I just started using "Drupal commerce kickstart" and i've created an new product variation type. When I'm adding a new product of a specific type, it doesnt give me the option to setup its &...
Ivan Marusic's user avatar
0 votes
0 answers
25 views

Control order views are considered for display based on contextual filters

I have two different views being used to show two different types of content. One is a view to show a taxonomy term and it has a path like this: /foo/faa/% with % being for the term placeholder The ...
fallenturtle's user avatar
1 vote
0 answers
34 views

I can't filter the taxonomies connected to a content, it gives me only one result and all the rest remain invisible

I installed a version of drupal 9 on a new hosting, and I started from scratch. It gives me a visualization problem for the taxonomy I created a Movie News content in which I inserted the taxonomy ...
Luca Pagnoni's user avatar
0 votes
1 answer
49 views

Allow certain user role to add tags

I have added a taxonomy entity reference on a node. I want users of certain roles to only select from the list and not allow them to create a new one. A user role A to select from the list or add a ...
Pradeep Nayak's user avatar
0 votes
0 answers
125 views

403 when trying to retrieve data via the JSON:API

I'm trying to find all taxonomy terms, where one field IS NULL via the JSON API. So I'm testing to retrieve a node via the name and it works without any issues: /jsonapi/taxonomy_term/tax?filter[title-...
Chris's user avatar
  • 277
0 votes
0 answers
51 views

View media with group permissions

I have a file media type and these files will be private files, with different access levels (1, 2 etc). What I need View page only for registered users, if the user has granted access level 1, the ...
Pedro's user avatar
  • 144
0 votes
1 answer
19 views

Hide date field on taxonomy page

How do I hide this date field on this page? The page is a taxonomy term, not a node. Under Manage Display, I've set Taxonomy Post Date to "Visually Hidden" but it persists.
Harvey Johnson's user avatar
1 vote
2 answers
169 views

Remove an item from list of taxonomy terms based on the value of a Boolean field

I have set up terms for a taxonomy vocabulary ("User Group"). Each taxonomy term has a field "Hide from selection", which defaults to False. When rendering the widget (as a ...
John Doe's user avatar
0 votes
1 answer
88 views

How to hide terms from entity reference field on node form

I've been searching quite a bit on this already and was not able to find a solution. installation is d10 So on my node I have an entity reference field which is showing Taxonomy terms. Two of those ...
arnemichiels's user avatar
0 votes
1 answer
84 views

How to render the image or several images in the table render element?

I have a form. In the last step of the form, I display in the table what was saved in the fields in the previous steps. Where there is a comment in the code, I need to render the all images from the $...
nathan111777's user avatar
0 votes
1 answer
375 views

How can I change the label of the title field "Name" of my taxonomy?

I want to customize the title label of my taxonomy, the name field. By default, its value is "Name". I know I can use the mymodule_form_alter hook and do as followed: $form['title']['widget']...
Zatigem's user avatar
  • 123
1 vote
1 answer
57 views

How to access the node/term field-values in a cleaner way?

My code is filled with methods like these to access field values: \Drupal::entityTypeManager()->getStorage('node')->get('field_name')->getValue()[0]['value']; \Drupal\taxonomy\Entity\Term::...
seventh_sniper's user avatar
0 votes
1 answer
42 views

is it posible to get the value of other fields right inside the buildForm() method without having to save configuration?

I have a config form with two select fields. The first one(vocabulary) gets populated automatically without problems with options taken from the available vocabularies for users to pick up one. The ...
Jorge Luis Arzola's user avatar
0 votes
1 answer
63 views

"Most popular" tags of the day

How can I create a list of the most popular tags of the day, based on the actual date, using view? The most voted answer for Most popular tags in a list as a block helped me to set a list of the "...
esQmo_'s user avatar
  • 107
1 vote
0 answers
48 views

Excluding some taxonomy terms from a view when grouped by taxonomy

For node type 'people' I have tags A, B, C etc. Some people have multiple tags. On my view I'm grouping them by taxonomy term and selecting A,B,C,D etc under 'Select terms from vocabulary People type' ...
spiderfingers's user avatar
0 votes
1 answer
253 views

Creating taxonomy terms via REST API using POST: proper formatting of json?

On Drupal 9.4 here and I want to create taxonomy terms via the api. Is there a good example of what I need to POST to an API end point?
Patoshi パトシ's user avatar
0 votes
1 answer
38 views

Override a field in a taxonomy terms view

I have a taxonomy terms view, filtered by a vocabulary. I would like to add the dashes before the term name like in the Parent terms field on the edit term page. The code in TermForm.php does that ...
esod's user avatar
  • 329
1 vote
1 answer
206 views

Get the value of taxonomy custom user field

I am trying to get a taxonomy field in hook_user_insert(). The logic is that if the taxonomy field is selected as none then print warning message along with a success message. function ...
Priya Degwekar's user avatar
1 vote
2 answers
323 views

Migration entity_lookup not picking up repeating taxonomy terms

Background: I am creating new articles in Drupal 9.5 from a source database using the Migrate API. The articles optionally have references to one or more taxonomy terms. I have already created the ...
Chandra's user avatar
  • 11
2 votes
0 answers
48 views

How to group taxonomy terms by depth in views?

my example taxonomy looks like this: - fruit -- apple -- orange -- banana - vegetable -- carrot -- cabbage i want to render a page in views that groups level 1 terms by their parent term, The ...
Tomáš Bažant's user avatar
0 votes
1 answer
28 views

Unable to update node entity fields using custom form

There is a certain content type, in which there is a field to enter a node or taxonomy. I want to create a new node for that content type using a custom form and register the node or taxonomy in the ...
shibasaki_stack's user avatar
0 votes
1 answer
120 views

Error when trying to retrieve a term with ajax

We are creating a custom form to edit a certain node. We do this above because there are some things that cannot be accomplished with the default form. I want to use AJAX to populate the fields of the ...
shibasaki_stack's user avatar
0 votes
1 answer
404 views

Creating a Custom Content Listing Page based on specific content type or taxonomy terms selected in the node

I am trying to create a content type that generates a list of content/nodes based on other content type or taxonomy terms selected within that node in the content type. I have a general content type ...
JohnC95's user avatar
0 votes
0 answers
75 views

How to show content / blocks in views for path component 3, 2 OR 1?

The taxonomy contains mostly 3 levels, sometimes two levels only. Parent Child 1 Grandchild 1 Child 2 Via path alias, the patterns create URLs like: /parent/child1/grandchild1 /parent/child2 ...
Chris's user avatar
  • 277
0 votes
1 answer
27 views

Auto assign term to node from term field from user

I have a term field called "Organization" on both Content and User entities. On the Content entity, the field for Organization is hidden. For the user, they select a value for Organization. ...
ymdahi's user avatar
  • 662
0 votes
1 answer
652 views

Get taxonomy and check if published?

I am trying to display taxonomy programitcally. The problem is, all taxonomy is displayed whther published all not. How can I filter only published taxonomy. I use this code to get taxonomy. $tree = \...
May 's user avatar
  • 163
1 vote
1 answer
328 views

Sort nodes by weight of taxonomy term attached to field

In a query for nodes I'm trying to sort the nodes by the weight of a taxonomy term attached to one of the node fields. Here is how my query is built $node_storage = \Drupal::entityTypeManager() ...
Amy's user avatar
  • 5,738
1 vote
0 answers
34 views

How can I find all the nodes that use a hierarchical vocabulary taxonomy term and reference a child term but not its parent term

I am using Drupal 7. I have a content type "Public Resource" that uses a hierarchical vocabulary called "Resource Topics" that has up to 3 levels (parent->child->child of ...
Matt Pugh's user avatar
1 vote
1 answer
1k views

How to retrieve all taxonomy term using json api

I want to retrieve all taxonomy term name using json api. I have tried: http://local-tes/jsonapi/taxonomy_term/specialties but its only return 50 values, I want to fetch all taxonomy terms values.
amol's user avatar
  • 347
1 vote
1 answer
33 views

Avoid group of revisions history view duplication

My taxonomy View lists all revisions grouping by different columns, by adding revision fields for each value, and get the filter "published" removed. The only filter is: city name (not null)....
Kingto Wong's user avatar
0 votes
0 answers
35 views

Views: How to filter content by taxonomy terms that are not selected?

I have a view of a specific content type that can be filtered by two different taxonomies A and B. Some nodes that have the taxonomy term A1 also have the term B5. Now when I filter only by the term ...
0711master's user avatar
1 vote
1 answer
91 views

How can I add term's vocabulary name as body class?

I already had following codes added, which adds term ID as body class. However, how can I change the ID to term's vocabulary name? For example: <body class="term-type-cameras"> /** *...
Kingto Wong's user avatar
2 votes
0 answers
692 views

How do I add a query condition to the QueryPluginBase in hook_views_query_alter()?

Using hook_views_query_alter() for a view configured as a REST feed, I'm attempting to add an additional filter value to the query, based on the presence of multiple filters passed via the URL. I need ...
Joseph's user avatar
  • 21
0 votes
1 answer
41 views

Sub category wrongly classified to root level and cannot be rectified

I am using SHS (Simple hierarchical select) which allows the user to create the child term under the parent term by themselves. For example: root --Canon (parent level) ----5D3 (child level) When I ...
Kingto Wong's user avatar
1 vote
1 answer
142 views

Create vocabularies with the JSON API

I found this identical question but it seems to be dead and none of the answers help me. I also don't have enough reputation to ask in a comment, so, since I'm at the end of my rope with this issue, I'...
JBHUTT09's user avatar
0 votes
1 answer
60 views

How can I show child categories in the parent category page?

I have created a new vocabulary with some extra fields and these taxonomy terms. Parent 1 Child 1.1 Child 1.2 Child 1.3 Parent 2 Child 2.1 Child 2.2 Child 2.3 Parent 3 Parent 4 Parent 5 In the ...
Abhilesh Sharma's user avatar
0 votes
1 answer
29 views

How to differentiate the state when a contextual filter is applied?

Hello to all the Drupal community. I've recently faced a challenge to visually modify some parts of my view's template for the state when its contextual filter is applied. Some details are as follows: ...
Themetis's user avatar

1
2 3 4 5
73