Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

New answers tagged

0

You don't need two Views Display for that, you can do that one with one Page Display. Create Views of type Taxonomy term and add Page Display Add Filter for Food Vocabulary Add the Parent Relationship. It is called Taxonomy term but look at the Description The parent term of the term. This can produce .... If you Require it the results will only show ...


1

You do not have to write any code to achieve that. Just go to the views edit page, add a contextual filter named as Has taxonomy term ID and select Provide default value, see screenshot for more options However, you can also do it pragmatically function HOOK_views_query_alter($view, $query) { $term = menu_get_object('taxonomy_term', 2); if ($term &...


0

You don't need additional modules to create different Taxonomy term pages, in D7 nor D8. Taxonomy Display and Taxonomy Views Integrator modules save steps in certain cases, but you can recreate their functionality with configuring different Views for different cases. You can reuse the existing Taxonomy term Views (this lists nodes based on the taxonomy ...


0

I combined Classy's field.html.twig with Rene's suggestion, in the file field--node--field-tags.html.twig: {% set classes = [ 'field', 'field--name-' ~ field_name|clean_class, 'field--type-' ~ field_type|clean_class, 'field--label-' ~ label_display, ] %} {% set title_classes = [ 'field__label', label_display == '...


0

It is not (yet) possible. See issue on drupal.org for link fields for example in menu link or redirect to: Allow multiple target entity types in the entity reference field.


0

It seems Field collection/tabular data solution is what you're after. In Drupal 7 the popular module for that was Field collection. In Drupal 8 Paragraphs seems to be popular, although its description is pointing heavily to the current fad of designing content pages with separate sections, it is still a solution that allows for a more structured group of ...


0

Your friend is: Taxonomy term: Representative node This is a duplicate, by the way.


0

You can try https://www.drupal.org/docs/8/modules/permissions-by-term, hope this can solve your problem.


0

You can also see the structure from config file Filename: field.field.node.article.field_tags.yml


0

Here is a simple method available for the same : $tid = 'Enter tid number say 5'; $nids = taxonomy_select_nodes($tid, FALSE); // count node here $count = count($nids); // you can load node content here $nodes = node_load_multiple($nids);


0

@wonder95, this doesn't seem to work for me since there are 2 errors in your code IMHO. First, you should be filling up the $new_results array inside your if condition and not the else condition. Secondly, $view->result = $new_results; has no affect on the final result set. You'll need to use unset instead. Below is my final working code function ...


2

Something about the answer by @No Sssweat got me thinking, so I searched differently and discovered that arguments.field_topic_target_id contains the value from the contextual filter. So, the answer is to my question is to use: /books-by-popularity/{{ arguments.field_topic_target_id }} as the Popularity link in the menu. Credit to @No Sssweat for providing ...


1

In Fields, add field_taxonomy (the field that references the tax term) and checkmark ☑ Exclude from display. In Header, add Global: Text area (Global: Text area) and checkmark ☑ Use replacement tokens from the first row and use the proper replacement pattern. Something like /books-by-popularity/{{ field_taxonomy }}


1

{{ content.field_type_poi }} doesn't necessarily render the entire content of the taxonomy term. You can select the field in the tab Manage Display where you've added the field field_url to the vocabulary. If you need multiple field selections, here only this field, but in all other places the default selection, then add a custom view mode in Custom Display ...


0

As mentioned in comments if you want it shown everywhere you should untick the Type options, then they apply anyway. And on the Seite delete everything, that should show it everywhere too without restrictions (no need for /*). But I think your particular configuration isn't working because you have included the /de/ in your path under Seite, the language ...


Top 50 recent answers are included