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
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
27 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
23 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
28 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
31 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
24 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
43 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
4 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
70 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
39 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
13 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
27 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
14 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
36 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
44 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
23 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
26 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
13 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
48 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
39 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
30 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
63 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
57 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
65 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
44 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
39 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
32 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
68 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
63 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 ...
0
votes
1answer
64 views

Exposed filter or facet for a vocabulary listing select list

I have to create a form with a fulltext search field and a dropdown listing every terms of a certain vocabulary. On submission the form is redirecting the user with the value of both the fields as ...
0
votes
1answer
27 views

Configure a view to display nodes that match a term value of the container node

I have two content types: Programs Events I have a vocabulary: Programs I have a view that displays Events, and I place the view in my Programs nodes. Both Programs and Events have a ...
0
votes
1answer
85 views

Checking for string in variable fails in twig

I'm working on a twig template for use with a commerce product. Each product has a term applied to it like "Green Ball", "Yellow Ball", "Red Block", and "Purple Block". I'm trying to take the ...
0
votes
0answers
17 views

How to reference current user when creating taxonomy term

Using drupal 8.7.x I'm trying to create a vocabulary that references the user that creates the term The settings of the user reference field are the following. The taxonomy term is created using a ...
0
votes
0answers
19 views

How to override confirmation messages when saving or updating/deleting content in Drupal 8?

I wanted to override status message after taxonomy term updated/deleted. I m trying to do with hook form alter as function atlas_common_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $...
0
votes
1answer
20 views

Assign different taxonomy terms to translations of content

I've got some custom content translated with entity translation with custom taxonomy also translated. Actually taxonomy terms are correctly shown inside the content page. The problem is I need ...
1
vote
2answers
203 views

How can I print the vocabulary name instead of the referenced term in a node template?

Let's say I have a content type article with a field "taxonomy". The vocabulary is "fruits". The terms are "apple", "orange", "bananas" The article belongs to "orange". I can easily print in my ...
0
votes
3answers
60 views

Menu tree from taxonomy terms and nodes which belong to them

i need to create a collapsible menu tree from taxonomy terms and nodes which belong to them (not nested terms, but content pages) i'm totally stuck about it i've found solutions for nested taxonomy ...
0
votes
1answer
11 views

Creating 'index' content views for L1-LX within a taxonomy

Note: This is a follow-on question from Creating a displayable 'index' of content nodes within a path Ok, starting to find my feet again within Drupal, and still getting up to speed with views. What ...
0
votes
0answers
18 views

How to fill a multi-value term reference field in a ajax callback in a node add/edit form?

The machine name of the term reference field is "field_persons", using the autocomplete_deluex widget. function zwznertags_form_alter(&$form, &$form_state, $form_id) { if($form_id == '...