Drupal 8 view works in preview but not showing on page - drupal

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.

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

Taxonomy block view shows no content

I am using Drupal 8.
I am trying to create a block display to show a list of teasers with the taxonomy term of the current node, within a custom region.
The problem is that when I navigate to the page which contains the custom region no content is displayed.
Other blocks display fine when assigned to the custom region so I don't think its anything to do with my templates.
The same view also has a page display (basically the default taxonomy term view) which shows content correctly when i navigate to the node.
I am a relative Drupal newbie so may be missing something obvious here but as far as i can tell the taxonomy view works as a page but not as a region, so either it must be something to do with the block configuration, or Drupal is just not meant to work like this.
Can anybody suggest what might be causing this, or if this is a bad approach explain why?
are u using exposed filters in your view ?
For it to work in blocs , u need to configure in your view
ajax:on

Classified Nested Category->Sub Category->Post View for Wordpress

I am really working hard to get a specific Post view in my Wordpress blog.
Example
Click http://theunlockr.com/roms/
Then Click http://theunlockr.com/roms/android-roms/
Then CLick http://theunlockr.com/roms/android-roms/asus-roms/
I figured that this is a nested view of categories and subcategories and finally the post in the respective category.
Need some input on how to do this on a basic wordpress blog.
I have already tried page builder and Grid views and alot of plugins, but cant really make this kind of view.
This is done via custom post types and custom taxonomies.
For example, you could create a custom post type rom, and assign the custom taxonomy roms with child categories Android ROMs -> Asus ROMs. This child category is assigned to the custom post type.

How to link taxonomy terms to view page?

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.

How to assign view block to dynamic taxonomy term page for CCK entries

http://localhost/rkk/work-type/non-profit
I created a vocabulary and terms under for work-type. and I created some posts...
Then I created a View Block to list my entries, and assigned to a page... everything fine so far.
I display the work-type at entry details page. and I have a link "click to see other non-profit(assigned work type) works". When I click this link, it lists entries assigned to that particular work-type. thats fine, but it displays title/body/readmorelink :/ I need custom view for this page, like I did View Block for listing all posts...
Can I assign custom created View Block to this taxonomy entry list page? the url changes according to work-type, so how do I assign view to changing-url :/
Appreciate helps!! thanks a lot!
UPDATE FOR MORE INFO:
I have a vocabulary (work type), and terms under (corporate, non-profit, etc...)
I have a CCK for "work", and as a field I have select terms of work-type vocabulary.
I have a Custom Views Block to display works in a page (thumb, title, desc, link, etc.).
When I click a work, it goes to particular Work entry details page, I place a link in there "click to see other -term (corporate)- works", etc.
When I click this link, it displays the Work Entries under that particular term. it works fine. but it displays as default look (shown as below), but I need this page same as main works page list (thumb, title, desc, link, etc.) I already have a View for this, but how can assign this View to this dynamic url taxonomy page? I found the module http://drupal.org/project/tvi , but cant make it work.
It should be simpler to overwrite term pages with a view, there's already a pre-configured view for this : taxonomy_term (wich is disabled by default)

Resources