Questions tagged [taxonomy-terms]
"Taxonomy" refers to Drupal's content classification mechanism, organised into vocabularies and terms.
3,527
questions
0
votes
1answer
36 views
Change page title
I've created a view to display products based on the taxonomy vocabulary Categories.
I followed a few how tos and check for answers on drupal.org, here & other websites but none is working.
I ...
-1
votes
1answer
16 views
How can I show related terms in the same list with related nodes in taxonomy term page?
I need to show sorted listing of both related nodes and related terms in a taxonomy term page. Can it be done with views or does it take a custom module?
0
votes
1answer
21 views
Create taxonomy terms [duplicate]
i'm new to drupal (just installed v9) and want to add a bunch of content.
like in the question asked years ago (Create taxonomy terms on the fly) i want to add taxonomy terms on the fly while adding ...
0
votes
1answer
18 views
How to filter content by a specific taxonomy term when vocabulary allows multiple values?
I have defined a vocabulary that allows multiple terms to be checked for a Content Type and I would like to create a View that could gather all the data from that Content Type but grouping the results ...
0
votes
2answers
34 views
How to filter my view of Groups to show results matching Term A or Term B
I am adding taxonomy terms to groups (using the group module) and want to use the terms to filter groups within a view. However, my exposed filters don't seem to work. There is no error, but the ...
0
votes
1answer
15 views
View Taxonomy Term List with Exposed Has taxonomy terms (with depth) filter
I have view list of terms of a vocabulary. The terms of it have an entity reference field of another vocabulary (with hierarchically organized terms).
I would like to filter the terms by that entity ...
1
vote
0answers
17 views
How do I migrate relationships from json_api source?
I'm trying to merge content from two D8 sites, using the migration api and json_api as a source. There are terms that have been migrated so I'm trying to migrate the relationships
Source data looks ...
1
vote
1answer
49 views
Reuse fields programmatically
Conceptually and for performance purposes it is advisable to reuse existing fields in Drupal. This is very easy to do manually, but my question is, how can I do this programmatically?
I have the ...
2
votes
0answers
33 views
How do I get a view to list nodes that have the same detail in a particular field as the current node?
Using D8, I'm putting together a genealogy site for my family and having a hard time creating a block that lists the brothers and sisters of the Person being displayed.
The basic unit of the site is ...
0
votes
1answer
46 views
How are better exposed filters - checkboxes value - assigned
I have been wrestling with this for a number of days. I apologize if this has been asked elsewhere, I am not able to find the fix, or maybe I am just not thinking in an incorrect way to make this work....
3
votes
1answer
46 views
How do I generate taxonomy terms with drush 10/drupal 9.1.x [closed]
I'm trying to use drush to generate some taxonomy terms for a sandbox/development instance. This might be an error report by I'm a drush noob so I wanted to ask first.
When I run drush devel-generate:...
0
votes
0answers
33 views
How can I migrate taxonomy data from an outdated site?
I have a site building with an old version of D8. The site can not run up and all I get is a backup sql file. So I'm creating a new D8 site with the latest version, trying to restore the data. When I ...
0
votes
1answer
37 views
Changing the layout of a Taxonomy Term Page
By default my taxonomy term page lists all articles using this term in 2-columns. I would like to change it to a 1-column layout.
(1) I have created a custom display layout for the taxonomy group:
(2)...
2
votes
1answer
70 views
How can I add a new field from config inside hook_update_N? [duplicate]
I have to add taxonomy by php code. Taxonomy has to got 2 fields. I added new function to test_taxonomy.install, and it seems to work:
function taxonomy_update_8805() {
$config_path = 'modules/...
-1
votes
1answer
26 views
How do I get the taxonomy term name?
I added a taxonomy field inside a view.
I need to show the term name on the page in a grouped way, like this.
taxonomy term1 name
title1
content1
title2
content2
taxonomy term2 name
title1
...
0
votes
2answers
25 views
Hide taxonomy term from a view filter where the filter results are empty
I have several nodes and several taxonomies, but only some nodes have taxonomy relationships.
My problem is that the taxonomy filter shows those terms too which don't have any node relationships at ...
1
vote
1answer
19 views
Contextual filter based on base level of taxonomy
I've been trying to get the following working for a couple of hours:
I have a views block, it displays a single content type.
The content type has a taxonomy field.
The taxonomy items are structured ...
1
vote
1answer
41 views
With Commerce Product taxonomy term view, is there a way to have page title set to the translated term title?
The only way to have the taxonomy term name in the title of a taxonomy term Commerce Products view page I've found so far is the example view in the estore theme (I still don't get how tid which ...
0
votes
1answer
28 views
How do I re-create a built-in view?
I duplicated a view before making changes, but it didn't save and I'd changed most of the view settings before I realised I was working on the original.
How can I recreate the standard taxonomy view?
...
0
votes
0answers
25 views
Parent terms aren't recognized
I have a term migration with an SQL source (WordPress) but the parent term is not properly set when imported into Drupal.
Config:
id: wp_terms_my_terms
label: WordPress Terms: My Terms
migration_group:...
0
votes
1answer
35 views
How to classify a view by letter?
I have tags (taxonomy terms) and created a tags pageview.
I want to sort my tags alphabetically and group them by letter of the alphabet.
How can I do this? Thank you
I want a single page. I don't ...
0
votes
0answers
40 views
If I have 2 same name taxonomy term which is used with nodes. how to set only one instead of both?
I have 2 taxonomy terms with the same name (knight(2) and knight(6)) in my Drupal 8 Project; both terms have been used with nodes.
I want to replace knight(6) with knight(2) in all the nodes. I ...
2
votes
1answer
54 views
How to limit the terms of the view to the terms used?
On the product I created a "tags" taxonomy terms field. I have created a hundred "tags".
My products use around 10 "tags".
I created a pageview of my products with an ...
0
votes
1answer
31 views
How do I get the term name in a custom submit handler?
In Drupal 8/9, when you create a new term, the default status message is:
Created new term %term.
%term contains the term name, which is linked to the term page.
I want to override this and remove ...
1
vote
1answer
48 views
Get the form to add a term to a vocabulary programmatically
I am working on Drupal 8.9.6.
I am trying to retrieve the form to add a term to a vocabulary programmatically. I know how to do it for a content type:
$values = array('type' => $content_type);
...
1
vote
1answer
42 views
How can I update the name of a taxonomy term using hook_update_N?
I have taxonomy terms of color and I made a typo in one of the color name. It should be 'Crystal Black Pearl' instead of 'Crsytal Black Pearl'. How do I change it using hook_update_N ? Thank you in ...
0
votes
1answer
49 views
Filter views for same taxonomy term
I am using D8. I have two views (articles and videos) sharing the same taxonomy (segments). How can I filter the views based on the view type?
For example, if I am on the articles page, I would need ...
0
votes
0answers
17 views
Unique Taxonomy Term Requirement Across Vocabularies
I haven't used taxonomies much so I'm hoping for a quick explanation on an issue for a site I'm working on.
Let's say I have two vocabularies. Portland and Seattle. In each one I want to have a term ...
0
votes
0answers
52 views
Programmatically remove an entity reference field
I am new to Drupal 8. What I want to achieve is to delete the taxonomy term (entity reference) and its association from the nodes where it is referenced. Node has multiple languages, revisions, ...
0
votes
1answer
30 views
Content editor cannot view unpublished taxonomy terms when editing a node
We have a custom content type that has a Entity Reference field to a taxonomy vocabulary. The content editor is presented a list of check boxes to select their terms to attach to the node. Some of our ...
0
votes
1answer
23 views
Filter by taxonymy ID with multiple field in contextual filter
In drupal 8.9 I need to filter by taxonomy ID over multiple fields in the contextual filter of views.
How to do this ?
0
votes
0answers
15 views
How to change image resolution on selection of field type
I am creating a Content type and added field (like: category, image etc). I want to use different resolution default image for each category. As well as I want to restrict the user to upload specific ...
0
votes
0answers
18 views
Display taxonomy parent tid of a taxonomy term reference field
On a node template , i am displaying a taxonomy term ( entity ref field ).
That taxonomy term has a parent.
How can have that info on the html generated , for css purposes ?
The field.html.twig ...
0
votes
0answers
16 views
How to expose the URL alias of a taxonomy term in a View?
I have a View showing Taxonomy Terms as JSON, and want to expose the URL aliases of those terms:
{
"terms" : [
{
"term" : {
"name" : "Media ...
1
vote
2answers
99 views
How to get taxonomy term name/label from a field?
Ok, so I'm trying to populate a field based on the selection of a taxonomy term. I've mainly got it working thanks to this stack exchange article
use Drupal\taxonomy\Entity;
function ...
0
votes
1answer
114 views
How to get taxonomy term reference fields value translated in twig
I have a taxonomy vocabulary with terms.
In a content type, I have a referenced field with this taxonomy.
I can get the taxonomy term in twig like this :
{% for item in node.field_lorem %}
{{ ...
0
votes
1answer
24 views
Have a child node inherit taxonomy from a parent during /node/add?
In Drupal 7, I have two content types:
Parent Events with tags (like "outdoors" or "popular" or "suitable for kids"). "Tags" are taxonomy terms in a vocabulary,...
1
vote
1answer
23 views
Why taxonomy term view is showing only a single content?
I'm working on customizing some templates on an existing Drupal 8 site. I was about to start working on the taxonomy term page but noticed only a single content is showing in it. I already checked and ...
1
vote
1answer
127 views
taxonomy_term entity loadByProperties depth not found
The terms returned contain depth as a Term object attribute.
$vocabulary = 'category';
$entity_manager = \Drupal::entityTypeManager();
$entity_storage = $entity_manager->getStorage('taxonomy_term');...
0
votes
1answer
43 views
Limit views exposed filter options to terms with associated nodes of content type X
I have a module which limits the options in a views exposed filter to terms which have associated nodes. The code is based on this answer: How can I limit the exposed filters to only display values ...
0
votes
0answers
28 views
Render content to multiple nodes from one input
I'm looking to create a dropdown of country selects each with two fields: field_item_title and field_button_link across multiple nodes. The content is populated by repeating nested paragraph fields.
(...
0
votes
2answers
102 views
How to programmatically associate a taxonomy term to a field
I'm trying to import user profiles data from a JSON file. Several fields are entity reference to vocabularies.
I'm able to create a new taxonomy term entity in the universities vocabulary bundle ...
0
votes
1answer
28 views
How to make a facet search on a taxonomy term contained in a paragraph contained in a content type?
On Drupal 8, I try to make a facet on a taxonomy term contained in a paragraph entity contained in a content type. Is it possible?
My stack : Druapl 8.9.0 + Search API 8.x-1.17 + Facets 8.x-1.5
In ...
-1
votes
2answers
25 views
Looking for a solution to add taxonomy after user submitted a node?
I want users to be able to publish content without having to associate it with a specific taxonomy term. They only have access to taxonomy tags.
I would like to be able to assign content to categories ...
0
votes
3answers
56 views
How can I delete a poorly named vocabulary?
I've created a couple of vocabularies programmatically, and accidentally included some spaces in the machine names (caused by bad data in an input CSV). I can't delete these vocabularies with ...
1
vote
1answer
24 views
how to add attributes of the parent taxonomy in the DOM?
I am displaying a taxonomy "category" on a node, a view of that node ,and a search facet.
This taxonomy has 2 levels.
How can i add to the rendered HTMLs, i guess using preprocessing hooks, ...
0
votes
1answer
34 views
List of parent and child taxonomies and related content
I would like to show in the front page a list of dishes. Like a real restaurant menu, I would like see:
Wines
-Whites
--Product 1
--Product 2
-Reds
--Product 3
--Product 4
Beers
-...
0
votes
0answers
35 views
Alter webform-term-select options
I have a select input that's pulling it's options from one of our site's vocabularies. I'd like, however, to alter the options to include a data attribute based upon a custom field within the term.
...
1
vote
0answers
50 views
When using “Filter by an entity reference view,” can I enable the “Create referenced entities if they don't already exist” option?
I have an entity reference field for taxonomy terms on a node.
The Default Reference method has the option Create referenced entities if they don't already exist.
This lets me add new terms via the ...
0
votes
1answer
17 views
Different custom view per taxonomy
I'm currently working on my first Drupal 8 project and while many things are now integrated in the core, others still stump me (for example restoring options to now bare bones CKEditor requires like 4 ...