Drupal 8 equivalent of taxonomy term converted to term id views - drupal

So in Drupal 7 it was very easy to pass a taxonomy term by name as a contextual filter and it USED to have the option of convert term name to id. What's the equivalent of that in Drupal 8? I've tried the validator as "taxonomy term name" and it doesn't work. When I try to pass it by name I get nothing, but when I do ID it works. So I don't understand how to pass the actual taxonomy term name as the filter.

You first have to create a relation with the taxonomy terms by adding the relationship with the taxonomy list or Taxonomy terms on node. Once you have added the relation, you can now add a contextual filter called name with the category Taxonomy term. This way you can pass the taxonomy term by name to the filter.

Related

View: Exclude nodes that have the same taxonomy term id(s) as current node

Drupal 8
I have a content type with a field that holds a Taxonomy Term Reference. I want a View that shows other nodes of the same content type that do not have that field with the same Taxonomy Term ID as the currently viewed node.
Example:
URL: /story/storyA
Currently viewing a node of Content Type Story that has a Taxonomy Term Reference to value B. I need the view to show other stories that do not have that same Taxonomy Term Reference to value B.
I thought I could achieve that by
Set up a relationship to the field that holds the Taxonomy Term
Add a Filter Criteria of Term ID associated to above relationship and with operator is not equal to. PROBLEM: how do I get the token for Value?
I also tried to go about adding a Contextual Filter associated to the created relationship and selecting Exlude but no dice.
I finally figured it out, I was missing the adequate additional Contextual Filter:
Term ID , Provide default value with Taxonomy term ID from URL and the options Load default filter from node page and limit terms by vocab checked. And the last bit, in More, I have Exclude checked. This contextual filter is associated to the created relationship mentioned in the question.

Drupal - Taxonomy page (show all terms of vocabulary)

I am kind of new to drupal (version 7).
I have taxonomy vocabulary with terms.
Example structure:
Taxonomy vocabulary: Address list
Terms:
Address 1
Address 2
Address 3
How can i create page with all these terms for this taxonomy vocabulary? Even if term is not associated with any of content?
Basically i need an page, that collects all terms from Taxonomy vocabulary called Address list and shows all terms that are created for this taxonomy vocabulary.
I know in drupal there are always many ways how to create things. I need most simple, without hardcoding.
I don't need full solution - any good road/idea/advice.
Thank you.
Install Views module. Add new view & select Taxonomy terms of Type Address list.

Drupal 7 taxonomy term nodes sort by WEIGHT

I've created content type called 'price' and defined field called 'weight'. Also I've created field 'Taxonomy term reference'. When clicking on Taxonomy term it shows all nodes related to this term. But How I can sort them by WEIGHT field?
At this moment I've created pages for all terms in views(I was lucky, I've got only 8 terms). But if terms would be more than 8. How can I automate this process? I would like create only one views for all terms.
Define Views for field reference -> node listing -> add relation for taxonomy term -> add sorting for this relation.

Drupal 7 Taxonomy: Find TID by custom field value

// Application
Drupal 7
// Problem Background
My website imports product data from a CSV file. I have a module that parses the file and creates appropriate nodes. In the CSV file, product category is given by category ID, which are different than Taxonomy Term IDs I have for the product categories in Drupal. I have created a custom field in my Taxonomy Vocabulary ("category_id") to link Drupal categories to imported category IDs.
When creating a node during import, I need "tid" (Taxonomy Term ID) to assign a node to a Taxonomy Term.
// The Question
How can I find Taxonomy Term ID ("tid"), knowing the value of a custom Taxonomy field?
Your custom taxonomy field ("category_id") creates a table field_data_field_category_id which should have an entity_id column/field which is your tid.
If you have command line Drush access, you could do:
drush php-eval '$tax=taxonomy_vocabulary_machine_name_load("main_site_structure");echo $tax->vid;'

Drupal: Convert taxonomy term name to term id

Using 'taxonomy: term ID' as an argument in one of my Drupal views and I'm having trouble getting it to work correctly.
On the views administration page it states, "if using term name, it is generally more efficient to convert it to a term ID and use Taxonomy: Term ID rather than Taxonomy: Term Name."
How does one go about converting the term name from a URL into a term ID?
you didn't show how do link to this views with agruments, if like this: http://site.com/views_page/taxonomy_name, then:
arg(1) - it's you term_name, get id via: $term = taxonomy_get_term_by_name(arg(1));
result is $term->tid
But if http://site.com/views_page/taxonomy_name - is aliased path to taxonomy terms, views should see directly tids in argument handling via arg(2) in taxonomy/term/TID path.

Resources