How to link taxonomy terms to view page? - drupal

I have enabled the taxonomy menu module and created a custom view from my vocabulary terms. However, the taxonomy menu terms are by default in the following structure [taxonomy_category]/[term-name] and link to the default taxonomy view.
How can I override the default taxonomy term links to link to my view page?I want to link the taxonomy term to this view page : products/term_id . I have downloaded taxonomy display module but either I didn't know how to configure it correctly or it doesn't work....
Anybody, who knows how can I change the links of the taxonomy terms?
Thanks!

there's a default (disabled) view that links to "taxonomy/term/term_id". You should enable that view and make the necessary changes to suit your needs.

Otherwise, you can create a view.
In the "Page Settings" you have the path.
Just put "/taxonomy/term/%" in the path.
It worked for me.

Related

Add taxonomy terms list to homepage Drupal 8

Please help me to add taxonomy terms from custom taxonomy into home page. I have no idea how to do this as I'm coming from WordPress. In WordPress it is easy as calling get_terms(). I have following file as my home page: mytheme/templates/page--front.html.twig
I have more than one taxonomy type and all of them are going to queried in the home page.
How to query the taxonomy terms?
UPDATE:
I have created a new region called home_content in my theme.info.yml and I have created a view(block) for getting the taxonomy terms, added it to region in back-end and display it as {{page.home_content}}. It works but I have few questions.
I have fields for logo and text in the taxonomy. I want to list them too.
I need to customize the html. How can I do that?
Thanks for the support.
You don't really need to code anything
Create view with taxonomy terms required. Structure > Views > Create New View and add block view for taxonomy terms. User filter section to select specific terms or dictionaries. Save the view.
Go to Structure > Block Layout and insert block with your view into desired region. In visibility section, pages tab: type <front> in pages and select Show for the listed pages in order to display it on home page only.
Above steps will display your required terms on home page.
To copy and modify template(s) in your theme, follow the instructions on drupal.org: https://www.drupal.org/node/2358785

Drupal 8 view works in preview but not showing on page

I am using Drupal 8.
I have created a simple view. It is designed so that content with a taxonomy term (category) has a contextual filter.
I am wanting that a user can click on a category in an a custom content type of HowTo, and go to that category page, and on that page they can see a list of all other HowTo articles with the same category.
In the view editor, in the preview, it is working, with the contextual filter.
However, when I try this on the category page, it does not work.
Any ideas on how to fix this?
The issue for me was the url alias pattern was category/[term:name] and my view url was category/%. I changed the alias to [term:name] and it started working. So now my terms can be viewed at category/term.
I think the taxonomy term node was overriding the view display.
I had the same problem. In my case, was caused by having multiple views with the same path.

Drupal 7 - Add a wrapper around related nodes on Taxonomy term page

On a taxonomy term page, the taxonomy term info is shown first, followed by related nodes. I want to add a wrapper div around the related nodes (ex. class="related-nodes").
taxonomy-terms.tpl.php controls the display of the taxonomy term's fields, but I'm not sure how the nodes show up. I was thinking about making a node template for the taxonomy and doing something like render($content['nodes']). However, I'm not sure what the $content key would be for the related nodes.
One approach is to enable the Taxonomy term view display (is disabled by default).
In the view config, you can add classes by clicking in Settings of Format option.
Hope it helps.
Regards.

Drupal Taxonomy menu - getting it working with views

I want to create a taxonomy menu of tags which point to view of documents filtered according to the tag id.
Taxonomy menus can do this, but in the documentation it says it requires Taxonomy menu custom path, and taxonomy menu hierarchy modules. But they are nowhere to be found. So in my taxonomy edit page, under taxonomy menu, I don't get the complete options. Under 'menu path type' I only get one option, 'default'
This is in reference to Drupal 7.
This thread addresses the issue and (starting at comment #9) offers a patch and suggestion, though it looks like it's still acting buggy for D7.

Drupal change display based on vocabulary

I need to have terms related to a specific vocabulary use a custom view I have set up.
For example: I have a vocabulary called "Book Categories" with terms under it such as Humor, History, etc. When navigating to a term page (taxonomy/term/7), I would like to display just the book title and a custom book-cover field. By default, Drupal displays node title, teaser, and links on all taxonomy term pages. The problem I am having is I would like terms that fall under the "Book Categories" vocabulary to use my custom view, and all other terms to use the default view.
Is there a way around this? Any help is appreciated.
You can clone default taxonomy view and change fields section as you like.
In PAGE SETTINGS->PATH remove "%" and add taxonomy number of your Book Category (like "7")
In contextual filter delete all filters.
This view then should override default view.
Hope this helps.
There is a new module called Taxonomy Views Integrator that seems like it does what you want to do. Try it.

Resources