Questions tagged [taxonomy-terms]

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

Filter by
Sorted by
Tagged with
-4
votes
0answers
29 views

Documentation View

I am looking to create a document/node library on my Drupal 8 site that looks a bit like this: https://docs.devexpress.com/WindowsForms/114561/controls-and-libraries/forms-and-user-controls It is for ...
0
votes
2answers
724 views

Can I create a link to a nodes taxonomy page?

I have a page that has a single category applied to it, for this example, "Self Help Books". I want to put a place on content type that display a "view all [insert category here]" that links to that ...
3
votes
1answer
572 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
756 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
631 views

How to trigger a rule if a node has a certain Taxonomy term?

I'm trying to create a rule using Rules that will apply a watermark to an image within a node (using the ImageCache Actions module) if that given node has a specific Taxonomy term. For example, nodes ...
0
votes
2answers
886 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 ...
0
votes
1answer
19 views

How to display content for a Taxonomy Vocabulary?

I am using Drupal 8. I have a Vocabulary called Fruit which contains terms: Apple Banana Orange I can go to page for term Apple and I can find all the content which was tagged with apple there. I ...
0
votes
0answers
16 views

How to display a set of custom contents in Taxonomy URL?

I am working with Drupal Commerce using core Drupal 8 and the type of data I am using is Product. When I tag a product with a taxonomy term and visit page for that taxonomy term, I don't see anything. ...
2
votes
1answer
594 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
2answers
578 views

Error in drupal_form_submit when taxonomy reference (tid) is set

While trying to creating a node programmatically using 'drupal_form_submit' i've come across a php error in the form.inc code Here's my code function vl_sample_data_generate_yvbct1() { ...
0
votes
1answer
18 views

Is there a way to create hierarchical taxonomies checkboxes?

I have an issue where I want to keep sub category inside a parent category. Say, for preferred vehicle I want a checkbox like this in node creation form []Car []Volkswagen []Toyota []Bike []...
2
votes
1answer
593 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 ...
2
votes
2answers
2k views

How to do “has term (with depth)” filter on field of a related field

i have a content type 'product', and two taxonomy lists 'company' and 'country'. Country list has one level of depth like: ........ state1 -city1 -city2 ........ Each product has a 'company' ...
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 ...
4
votes
1answer
2k views

View for Taxonomy terms?

How can I output nodes which linked with taxonomy term through a view? How can I link taxonomy vocabulary with a view wich will output appropriate nodes for each term of this vocabulary? In Drupal 7 ...
2
votes
2answers
841 views

set multiple taxonomy values programmatically

I have a view that has a "Has taxonomy term ID" contextual filter and also a nid contextual filter. I execute this view programmatically, but I need to pass also multiple values for the taxonomy ...
1
vote
1answer
12 views

Remove an item from list of taxonomy terms prior to rendering

What is the correct way to remove an item from a list within hook_entity_view or hook_preprocess_node? I am trying to remove a taxonomy term from a list of terms EntityReferenceFieldItemList. I ...
1
vote
1answer
441 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,...
0
votes
1answer
14 views

Create a View that Displays a group of Taxonomy Terms

I have a proposed data structure like this: Asset: Title Image Description Taxonomy term: Campaign Campaign (taxonomy dictionary): term image description I am trying to make a view block that ...
2
votes
1answer
35 views

How to get fields from taxonomy terms?

I am able to retrieve taxonomy terms programmatically, (as long as I only want to reference the default fields, 'tid' and 'name'). But how do I access custom taxonomy fields? $vid = 'MACHINE_NAME'; $...
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.
3
votes
2answers
1k 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 ...
1
vote
1answer
1k views

Inline Entity Form validation

Created a content type and add taxonomy form in it using Inline entity Form module. So, the rendered taxonomy add term looks like : What I want to do is ADD CUSTOM VALIDATION to the "NAME" field. I ...
1
vote
3answers
502 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 ...
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 ...
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, ...
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 ...
0
votes
1answer
776 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 ...
0
votes
1answer
28 views

There are no entities matching. BaseFieldDefinition entity reference error for taxonomy

My Code looks like this: $fields['color'] = BaseFieldDefinition::create('entity_reference') ->setLabel(t('Color')) ->setDescription(t('The color of the fruit.')) ->setSetting('...
1
vote
1answer
1k 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 ...
0
votes
1answer
2k views

EntityMalformedException: Missing bundle property on entity of type taxonomy_term

I have strange behavior that when i visit www.mysite.com/taxonomy/term/516/sdfsdf i get EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (...
0
votes
1answer
1k 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
1answer
345 views

How do I fill the authors name in a term reference field using Rules?

Content type stock contains the term reference field field_producer. What is the rule for Rules in order to fill this field with the node author name on creation? In detail The form looks like: -- ...
2
votes
2answers
817 views

View by Taxonomy terms hide empty terms unless they have children

I am trying to get my views block to display terms under this parent term but only show the terms with nodes in them. I managed to get this to work by using the relationship content with term and ...
0
votes
1answer
1k views

Views exposed filter for children terms when on parent term page

I have created a views with multiple exposed filters and I need another filter that is based on taxonomy. My taxonomy structure is: term 1 child 1.1 child 1.2 term 2 child 2.1 child 2.2 What I ...
2
votes
1answer
1k views

Alter Exposed filter form

I would like to know how to get parent terms only, for example "Ages 0-2" and also print in dropdown. This is the structure of the form array. Array( [#info] => Array( [filter-tid] => ...
1
vote
3answers
2k views

Output taxonomy term in views unformatted using twig

I'd like to output taxonomy terms as html classes for view-rows in the views unformatted template for Drupal 8. My code: {% if title %} <h3>{{ title }}</h3> {% endif %} ...
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
3answers
593 views

How to get vocabularies for an entity reference to a taxonomy?

So I'm having a bit of a difficult time finding out how to get the information I want. I have an entity reference field - call it field_event_type. This is an entity reference to a taxonomy. I am ...
-5
votes
0answers
24 views

Displaying content's tag on sidebar block

how to relate contents with a tag such that when I open specific content its corresponding tag should also appear on the sidebar block. For example, I have 4 contents and each content is having one or ...
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 ...
2
votes
3answers
7k views

How to improve search results filtering on taxonomy

I would like to know the best way to filter drupal search results using taxonomy. I want users to be able to search for particular results from a particular taxonomy..this can be done to refine ...
3
votes
1answer
856 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 ...
0
votes
1answer
884 views

How to organize categories and subcategories of products in menus?

I have product content type that I want to display in a menu. Every product belongs to subcategory that belongs to main category, for example: Computers: PC: - product 1 - product 2 ...
2
votes
3answers
1k 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
1answer
955 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] ...
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 ...
0
votes
3answers
1k 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 ...
1
vote
1answer
24 views

How to use hook_update_n to create a vocabulary

I want to create a standard vocabulary (no extra fields) in Drupal 8.7.5 programatically, using hook_update_N. I've never used this function before. So I'm a complete newbie. I've modified a simple ...
2
votes
1answer
4k 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 ...