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

How can I have three categories where the first category would have seven sub-categories?

I am trying to create an education website. As I have mentioned in the title, my requirements are to add 3 main categories, the first category has 7 subcategories, each subcategory has 6 subcategories....
0
votes
0answers
19 views

How to render related nodes by vocabulary X on vocabulary Y terms?

I did many research about related nodes by term. These solutions are good with related nodes by term on node pages but does not work on term pages. Solutions I found: Add "Content: Has taxonomy term ...
0
votes
0answers
12 views

Date difference with taxonomy field

I'm using D8 and I have a little problem with calculating age. I have a taxonomy term "Animal". It has a "name" and "date of birth" field. I have a content type "Test Results". It has a "date of ...
0
votes
1answer
12 views

Taxonomy Term View with Expose filter Dropdown of Terms Name

I Have a view of Taxonomy and "not Content". In this View I want a Expose filter of Term Name. But when ever i add Term Name as expose taxonomy's filter it shows text box and not Dropdown. Without ...
0
votes
1answer
10 views

How to create a default image per taxonomy term?

I want to associate a different default image with each taxonomy term. I saw this module - https://www.drupal.org/project/taxonomy_image - but it's in alpha. Anyone got any recommendations how to do ...
2
votes
2answers
85 views

Loading taxonomy terms in a tree in Drupal 8

I have multiple level of vocabulary, I want to display all level in the hierarchy same as taxonomy display. My taxonomy is like. All Drinks Alcohol Drinks Beer Vodka ...
0
votes
2answers
36 views

EntityQuery for taxonomy term of specific bundle

I would like to build a query for all taxonomy terms of a specific bundle. $terms = \Drupal::entityQuery('taxonomy_term') ->condition('type','mail_template') ->execute(); This returns an ...
1
vote
3answers
99 views

Getting “Call to a member function getName() on null” in custom breadcrumb

I'm trying to customize the breadcrumb of drupal 8 to get something like this: Home > category >article-title. I wrote this and I wrote the code below. namespace Drupal\module_demo\Breadcrumb; use ...
1
vote
1answer
30 views

How do I modify the URL to a taxonomy term?

I have a vocabulary called Industry with four terms. I have edited the terms to keep the URL to be automatically generated. They are following this convention: industry/term1, industry/term2, etc... ...
0
votes
0answers
13 views

Sort Search API results by taxonomy reference field name (and not TID)

I have a views index page that when displaying results without a text search I want to display sorted alphabetically by a taxonomy reference fields name. I can get it to sort by this reference field ...
0
votes
0answers
25 views

How to mark the fields of a view shown in a table as already read?

I have a view that displays the results as a table, and also contains an exposed taxonomy filter. I need a way to know when a certain field in a row has a value that has already been "seen". A row ...
1
vote
1answer
28 views

How can I have Devel generate nodes with different terms and not always the same term?

I am using the Devel module to generate content (nodes) as a test. The content type has a field referencing a vocabulary that has terms already added to it. When 1000 nodes are generated, Devel ...
1
vote
1answer
26 views

How to get a taxonomy custom image field URL value

I've created an image 'field_term_preview' field on the taxonomy vocabulary and trying to get this URL in my custom module: $terms =\Drupal::entityTypeManager()->getStorage('taxonomy_term')->...
0
votes
1answer
50 views

Photo gallery with taxonomy filter

It's not easy to explain so I made simple example below. I'm making a gallery in Drupal 8. First I made articles with taxonomy term: animals, forest or people. Some of articles have two or three ...
0
votes
1answer
32 views

Contextual filter using any term ID

I want to set up a view with a contextual filter that will work with any term id (without selecting a specific category). I could only find some old, dated mentions of this. So I'm not sure if this is ...
0
votes
0answers
28 views

Replace taxonomy vocubulary administration page with a view

I would like to replace admin/structure/taxonomy/manage/my_vocabulary/overview with a custom view. Some of my vocabularies have custom fields that I would like to display and use as filter for the ...
0
votes
0answers
52 views

How to display values of certain taxonomy term above the table with the search results list based on content type, related to entering search query?

I made a view which displays a search result list as a table. The searching process works inside one content type using Search API. The system also has to look for between taxonomy terms (name) first ...
0
votes
0answers
5 views

how to replace the old sorted display content in views with newly added content?

I have 5 display of contents in views then in each content type i added taxonomy which contain the order of 1-5.Now if i want to add a content to order 2 it should replace the order 2 with the new ...
0
votes
0answers
11 views

How to rename comment links on a taxonomy page?

I activated the taxonomy view and activated the comment fields (standard view field). And then an ambush. I can’t change the name of the link either in a view or in hooks. Add a comment to the one I ...
1
vote
1answer
37 views

If content type with specific field that is not empty has specific taxonomy term attach library [closed]

I would like to attach a specific library using a taxonomy term to a content type with a specific field that is not empty. The following is not working: function lehigh_preprocess_page(&$...
1
vote
1answer
74 views

How to load a taxonomy term with case-sensitive?

I used this $this->termStorage->loadByProperties(['name' => 'test']); I got two terms: Test, test. I want to get only one: test This is working without case-sensitive: $this->...
0
votes
1answer
41 views

Exclude taxonomy term from view display except its own?

I work on a news publisher site and I need help excluding a taxonomy term from view but still to keep it with its own page. E.g. Our content is organised by theme and region. For one set of articles ...
-2
votes
1answer
22 views

How can I display tags on one line [closed]

How to change the below output of a drupal article Tags display with bootstrap theme To something like this which is displayed in stackoverflow below any questions Is there a ready made module ...
0
votes
1answer
14 views

Have Views based Taxonomy Term page use term description for title

I am using a view to replace the standard Taxonomy Term page (turned on the standard one in Drupal 8.x). I want the Title of the page to be changed from the Name of the term to the Description of the ...
0
votes
1answer
7 views

View block filter by taxonomy term (field)

I am doing some block experiments because I'm new in Drupal and I want to know if I can create a view block to place X(more than one) times in the same page with different results by taxonomy term ...
0
votes
0answers
29 views

Migrate taxonomy terms

I am looking for a way to import Nodes to D8 from a source using Json Api The node is having terms referenced but i cant find a way neither a tutorial to import and then reference thoses terms to the ...
0
votes
0answers
15 views

Webform conditional relationship

I am preaty new on drupal however my issue still remain unsolved since start on drupal. I can easly assign a webform for a content and forms submiting according node information. But I have many ...
1
vote
0answers
17 views

Extending Core classes with the @internal tag

I need to make weights of Taxonomies translatable and only show translations of terms when you change language. To do this I need to override the OverviewTerms class from the Taxonomy module to ...
0
votes
1answer
38 views

Dynamic results label for Views with Taxonomy Filters

I'm using Drupal 8 Views with Better Exposed Filters to filter a custom content type by two custom taxonomy vocabularies. Results are filtered by: Content: Published (=Yes), Content: Content type (...
0
votes
0answers
14 views

Additional uncaught exception thrown while handling exception while creating a view [duplicate]

I am new to drupal, Created a website on drupal8 which has multilingual modules enabled and added one language and translated a content type. Created some views on this content type along with other ...
1
vote
0answers
28 views

Respecting permissions in getStorage('taxonomy_term')?

Edit: I just realized that Taxonomy permissions are not native to Drupal core, they are the result of a module we activated: Permissions by Term. (This will explain why they are not being respected by ...
0
votes
1answer
49 views

Sorting view results using contextual filters on Drupal 8

I created a views that filter nodes according taxonomy terms passed through contextual filters. Node 1: term1, term2, term3 Node 2: term1, term6 Node 3: term1, term7 Everything is working good, ...
0
votes
1answer
24 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
20 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. ...
0
votes
1answer
30 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 []...
1
vote
1answer
14 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 ...
0
votes
1answer
17 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
49 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
40 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
31 views

How do I 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 ...
0
votes
2answers
65 views

How to remove a taxonomy vocabulary via database query

To manually remove a taxonomy vocabulary in the database, what tables/columns etcetera do I need to delete or modify? I have a "ghost" taxonomy - it shows up in the list, but doesn't exist anywhere ...
-2
votes
1answer
58 views

How can I change the taxonomy term title?

Simple as that. I want to change the H1 tag from taxonomy views to something like "Articles from %term" to make it more user friendly and not redundant (breadcrumbs shows the term alone). I couldn't ...
0
votes
1answer
77 views

Views view unformatted and outputting taxonomy custom field

Original problem I had was I setup a taxonomy called Category. I added some vocabulary to my Category taxonomy. Some of the terms I added have contain spaces. The labels should have spaces so I want ...
1
vote
1answer
26 views

How to use term edit page instead of view page?

On the terms list page, each term is linked to the view page (i.e. term/[tid]). As I don't have any details in the view page, I would like to link it to edit page. (.i.e term/[tid]/edit). How to ...
1
vote
1answer
45 views

Drupal::entityQuery

This is the official Drupal::entityQuery function definition I found public static function entityQuery($entity_type, $conjunction = 'AND') { return static::getContainer() ->get('entity....
0
votes
0answers
40 views

Is it possible to output all taxonomy terms in page--products.html.twig template?

I am using Drupal 8.7.5. I setup three different taxonomy types. They are Category, Types, and Tags. I have a custom post type called Products. I created a View called Products and added that as a ...
-1
votes
1answer
34 views

List files in a directory as a table

I created a folder inside of my Drupal directory where my client can directly FTP into and upload or remove PDFs. What I'm trying to do is create a page called "Documents" which then displays all ...
0
votes
1answer
71 views

How do I use a term page display?

In Drupal 7, the module taxonomy_display allowed me to insert a content view via views display options under the taxonomy manage display. I am working on rebuilding my Drupal 7 views for Drupal 8, and ...
0
votes
1answer
75 views

Have can I have a view grouped by nested hierarchy?

I have a nested taxonomy as follows: Some forms will only have the taxonomy of "Basic Forms", some will have taxonomy of "overtime forms", etc. So I want my Forms view to look like this example: How ...
0
votes
0answers
16 views

Implementing a contextual filter in a view with nested taxonomies?

We have a menu with submenus, for example: MenuItem1 Sub1A Sub1B Sub1C MenuItem2 Sub2A Sub3B Sub2C MenuItem3 Sub3A Sub3B When you click on MenuItem1, we want the view to display the ...