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
12 views

How to use the Drupal 8 Field API to create a custom field where publisher can select from a taxonomy term and enter varchar?

I want to create a custom field type that holds the following: one of my taxonomy terms, that is a subset of a specific vocabulary a varchar 256 value I have a vocabulary defined for "identifiers." ...
1
vote
0answers
14 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
26 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 (...
-3
votes
0answers
15 views

How to add colors in taxonomy? [on hold]

I want to add colors in my taxonomy terms,i don't know how to do it.I used the color field module,but still don't know how to use.
-7
votes
0answers
18 views

The changes I make to Leaflet's pop up anchor settings when using field divIcon, do not display? [closed]

The popup sticks to the tip of the icon anchor. I also tried using the icon url/path but I don't know how to properly add the replacement pattern {{ field_marker }} to the path Please help. I have ...
0
votes
0answers
13 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
43 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
24 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
44 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
35 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
26 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 ...
0
votes
2answers
52 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
54 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
39 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
24 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
41 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
36 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
31 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
65 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
49 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
29 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
60 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
16 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
180 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
56 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
10 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
17 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 == '...
0
votes
0answers
27 views

Drupal facet search exclude filters

i have a situation with Search Facet and some excluded taxonomies from the filters on Drupal 7. Here is my scenario content is tagged with tags - taxonomies on the user profile, there is "Denied tags"...
0
votes
0answers
33 views

Issue with Views Contextual Filter using Taxonomy Term Name

I've run into an issue with views using contextual filters that feels like a bug but usually when I encounter what appears to be a bug it's because I'm doing something wrong so I wanted to see what ...
0
votes
1answer
55 views

Won't update taxonomy term

I'm not really a Drupal guru, so any help it'd be awesome. There's a taxonomy for every state (State Owner), which then allows me select the state when adding a new article. However, I'm trying to ...
0
votes
0answers
6 views

multiple view block by term that list node title tagged with child term

I want to display a view where multiple block are specific to first level term of a vocabulary and that it list all the node tagged with all the child term of that term with deep. I could create each ...
1
vote
3answers
34 views

How can I tell if I'm on a taxonomy page in preprocess_page?

If I'm on a node, inside preprocess_page(&$variables), I can check if (isset($variables['node']) && $variables['node']->bundle() == 'my-type') to see if I'm on a node, and a node of a ...
0
votes
1answer
20 views

D7 block view to only show child nodes based on taxonomy

Using Drupal 7 I have a hierarchical taxonomy each node in the site is assigned a taxonomy to identify where it sits in the site structure. On certain pages (landing pages) I would like to show the ...
0
votes
0answers
20 views

simpler hierarchy method than using taxonomy? JSON or XML file?

In Drupal 8... I have a couple instances where I need taxonomies with hierarchy, to be able to search by. But the taxonomy sizes are Large. Generally, the standard Drupal Taxonomy is wonderful. But I, ...
0
votes
0answers
10 views

efficient organziation of geographic state/region/content for entries

This is kind of a general question, but maybe someone has an idea. I have a database that will have 300,000+ entries. Each one of these entries will have multiple entries for 'location' - not ...
0
votes
1answer
66 views

JSON:API to Migrating Taxonomy References isn't mapping

OK, for a number of reasons I'm doing a Drupal 8 - Drupal 8 migration using the JSON:API module on the source site. I've run into an issue attaching taxonomy terms to nodes. Here's as far as I've ...
0
votes
1answer
41 views

Unpublished taxonomy term keep showing in main menu and contextual filter

I'am creating a Drupal 8 multilingual side, i have a main menu and a contextual filter that uses taxonomy term. in english version i wont translate all those taxonomy, so i dont want theim to be ...
1
vote
1answer
48 views

How to reference taxonomy used by other content type?

I have two content types: Content A and Content B Fields in Content A: Title, Location, Body Fields in Content B: Title, Type, Location, Body Location is a vocabulary (Au, Uk, Us, Ca, etc) Type is ...
4
votes
4answers
668 views

Error when viewing list of taxonomy terms

I'm getting an "unexpected error" when I try to view a list of taxonomy terms. I recently updated to 8.7, though I have a feeling the problem has been around since before the update. Here's the error ...
0
votes
1answer
108 views

Taxonomy Term Field of a Reference Field in a Product not available in Data Selector for CheckOut Rules

I installed Drupal Commerce Kickstart 2 with drupal version 7.54 and drupal commerce Version: 7.x-1.14. My problem is I want to send email to the store owner every time an order is completed. So in ...
0
votes
1answer
42 views

Creating a “tag blacklist” for users on a view

I'm looking to allow users to create a "blacklist" of certain tags on a site. My plan was to do this through adding a "Blacklisted Tags" field on the user entity, but I'm open to other solutions. If ...