Questions tagged [taxonomy-terms]

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

1
vote
1answer
456 views

How to subscribe to any or all taxonomy terms on one page?

I'm wondering about the best way to set up "subscribe to get email alerts" I have a content type which is "tagged" with various terms from various taxonomies and I want to set up a simple "subscribe ...
0
votes
2answers
432 views

View restricted to a specific taxonomy term

I have a custom content type called Property with taxonomy term fields set up for example for vocabularies Train Station, Style, and Area. I would like to create a view showing only those Properties ...
0
votes
1answer
442 views

How to change path of taxonomy facet

I am using facet search on my site. The search paths for taxonomy term facets are of the pattern "search/term-name", but I would like them to be of the pattern "search/term-tid". Is this possible? ...
1
vote
1answer
433 views

How to use Views PHP get Taxonomy field value and field collection value?

Dear drupal expertise, 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 ...
3
votes
1answer
475 views

How to use url alias in views for taxonomy terms?

On a Drupal 7 site with pathauto installed I'm using a view to show all taxonomy terms of a given node. The terms are linked to the term's page. The problem is, that the path of those terms does not ...
-2
votes
0answers
14 views

Make a catalog with view and taxonomy [on hold]

How can I build a catalog type view with taxonomy terms to access to my products?
0
votes
2answers
440 views

how to create a taxonomy Views combining terms from 2 different vocabulary

I have content types tagged from two different vocabularies (destination and category). i.e. destination (main vocabulary, content must be tagged with of one of them) - dest1 - dest2 - dest3 - dest4 ...
0
votes
0answers
14 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 ...
1
vote
1answer
451 views

Views, Taxonomy, multiple parameters using contextual filters

A view has been created to display related content types via their taxonomy terms, using contextual filters. Currently the view is able to display content based on the first param eg. about The goal ...
0
votes
0answers
7 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
579 views

Remove '-Any-' value from exposed filter term field

I have a view with an exposed filter field. This field always shows the -Any- value. The data shown is dynamic so I cannot select the values to show. I have to remove that option in some way. I've ...
0
votes
2answers
915 views

Default search not working for taxonomy terms

I am using Ubercart in Drupal 7. What I found was default Drupal search doesn't search for taxonomy terms. Any idea? I tried with Search API module but couldn't get any luck. Any idea like ...
0
votes
1answer
17 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 ...
2
votes
1answer
2k views

Retrieve taxonomy terms with EntityFieldQuery for a given parent term

I am retrieving a tid of a taxonomy term by using EntityFieldQuery. However, I need to cross-link the taxonomy_term_hierarchy table to list those terms which have a particular parent, but I am not ...
2
votes
1answer
494 views

Exposed filter list by tags

I have a view, which is listing nodes. I like to exposed filter it by tags (what is a taxonomy). But I like to show tags, what is relevant (has nodes) for the current view. How can I make it?
1
vote
2answers
70 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 ...
2
votes
1answer
563 views

How to filter taxonomy term in views from URL

I am working on a travel website, and I made taxonomy with depth continent/country/city. I also have taxonomy locations restaurants, museums, nightlife... I have content types destinations and ...
4
votes
2answers
529 views

Contextual filter with hierarchical taxonomy terms

Using contextual filters, I have created a view which shows a page of users at us/california, based on a taxonomy I have made of locations. This taxonomy is hierarchical, though, so when the user ...
7
votes
7answers
4k views

How to delete all terms in a vocabulary with drush?

As reported here I have big problems with huge vocabularies in Drupal 7. Now I want to empty the big vocabularies, but I can't do that via the admin interface, because its running out of memory, so it ...
4
votes
1answer
487 views

Use image from taxonomy term as exposed filter option

I created a view which has an exposed filter for taxonomy terms. Now the next step is to theme the options. I tried the module "Better exposed Filters" but I wasn't satisfied. I would like to have ...
0
votes
3answers
46 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 ...
-2
votes
0answers
22 views

Taxonomy ul parent in view

Greeting, I am new to drupal, I am currently a web developer of a company and I have to address a project in drupal 7, reading tutorials and looking like crazy I found solutions for some things, but I ...
0
votes
1answer
701 views

Pagination isn't working

I have a homepage view called FrontPage. Currently, it shows the pagination link like "1, 2, 3 Next->" as it should; when I click on Next, it goes to http://example.com, not http://example.com/page/1/...
30
votes
6answers
18k views

Programmatically create a term?

I'm attempting to add a lot of terms (~200) to a vocabulary, but I can't find any import modules that are updated for Drupal 8, and it seems the functions for doing this in Drupal 7 don't exist in ...
0
votes
2answers
1k views

How to change taxonomy url in node view page?

How to change taxonomy url in node view page in Drupal 8? In node view page I am getting taxonomy term url pattern as term/{%term_id}. I want to change taxonomy term url to custom url in Drupal 8. ...
7
votes
7answers
4k views

How to import taxonomy with hierarchy?

We're upgrading our site from D7 to D8, which has vocabulary containing multi-level parent-child hierarchy. The list is too long (around 5K-10K terms) to import manually. We've tried using migrate in ...
0
votes
1answer
44 views

Get taxonomy term ID from standard URL and then pass it to a View as a contextual filter

is a simple question, I whant get the term ID (tid) from standard drupal taxonomy url taxonomy/term/167 ou 167 is my tid and use as argument on views. I found this code to get the tid: $term_path=...
1
vote
1answer
552 views

How do I add icons to taxonomy terms?

I have a sample site running Drupal 8.1.x, I want to add icons to the taxonomy term. Example. I have a term called Animals with the following list in it Cats Dogs Fish i want to assign an icon ...
0
votes
1answer
504 views

Programmatically translate taxonomy terms

I have a vocabulary of taxonomy terms I get through taxonomy_term_load($tid); and displays in views page. How do I get and display the terms depending on the user's language?
0
votes
4answers
1k views

How do I remove taxonomy links from nodes?

Lately, I've noticed an interesting situation related to my Drupal site. When I enter the name of my site in Google's search engine, a list is retrieved with my site maintaining the first position in ...
19
votes
4answers
16k views

Load term by name

In Drupal 7, we can load the term using name for ex. taxonomy_get_term_by_name($name) Is there any way to load term via given name in Drupal 8?
0
votes
1answer
516 views

Order nodes based on entity reference filter

In my Drupal 7 website I have an A content type with an entity reference 'parent' field which I use to link to nodes of a B content type. I have to implement a way to sort A nodes basing on their B ...
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
2answers
647 views

On a content page that references a taxonomy term, how can I display only content that references that taxonomy term's immediate children?

In Drupal 8, I have a hierarchical taxonomy vocabulary called "Living Things" containing these terms: Animals --Fishes ----Blennies ------Yellow Blenny ------Green Blenny ----Gobies ------Blue Goby --...
1
vote
1answer
541 views

how to filter blog posts by taxonomy and by year

I have been trying to build a filter fuctionality for blog posts. I would want to filter by taxonomy terms and by the year the post was published. So basically in the content I want to list all blog ...
0
votes
0answers
14 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
23 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"...
1
vote
1answer
594 views

How can i display child terms under parent terms and assigned articles using entity field query?

Hi i have one content type with two vocabulary term references one is called category and terms is A,B,C like the 2nd one resources it contains parent with child terms like below hierarchy Resource ...
0
votes
2answers
540 views

How to create parent child menu programatically?

I have an array like this : Array( [0] => Array( [link_title] => Level == bod [link_path] => link1 [menu_name] => parrent-child-menu [weight] => 1 [expanded] => 1 ) ) Array( ...
1
vote
1answer
478 views

Taxonomy view doesn't display products

This is the situation. I have a product type and in this type i use a term reference field. Then i add some products. Next step, i create the product displays using the product reference field (the ...
0
votes
1answer
633 views

Merge multiple block views to a single jump menu

I want to implement a jump menu with a list of three different vocabulary terms grouped by each vocabulary name. If I make only a single view all the terms are shown correctly but I would like to be ...
0
votes
2answers
527 views

How to link taxonomy term with current loaded NID?

I want to link taxonomy term with current loaded node I am using $nid = arg(1); $term=taxonomy_term_load($tid) print $term; but noting happened. Please tell what is the correct way
2
votes
1answer
488 views

Problems with active-trail within a Views-generated block

I have played with Menu Trail by Path and Menu Position, but none worked well with a Views-generated listing acting as a navigation menu. Imagine the following scenario: On the left side there is ...
3
votes
1answer
355 views

How to automatically modify a field after saving content?

I have posted this question on drupal.org (via a comment titled "field modification triggered by saving action"), but I realized that the thread is more than five years old. So I reproduce here the ...
0
votes
1answer
48 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
27 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 ...
12
votes
9answers
28k views

Get taxonomy terms

I wanted to retrieve taxonomy terms from a certain vocabulary in Drupal 8. Apparently I can still do it using taxonomy_get_tree but it's deprecated. I now have to use TermStorageInterface::loadTree ...
-1
votes
0answers
19 views

Create a template file just for the first level

I need to create a template file just for the parents of taxonomy terms. First of all I don't know if the same as drupal 7 in 8 I should write this code in template.php file or not. In the second ...
1
vote
1answer
616 views

views with multiple contextual filters - should return data only when both or any one filter is present

Views of content is having two contextual filter. For some reason node object is available to views so it is passing through url's 7th argument. 1.Content: Has taxonomy term ID Configuration: Php ...
0
votes
0answers
68 views

How to translate vocabulary name?

Drupal 8 installation in English, German lang was added and set as default, vocabularies are set to English (no result even they are in German too), terms are set to German by default, Content ...