I have a taxonomy terms like:
-christmas
-wedding

How can I build a view with url page like this: www.site.com/% being % christmas or wedding,
If users go to www.site.com/christmas just display nodes with christmas taxonomy.
If users go to www.site.com/wedding just display nodes with wedding taxonomy.

I have to build X Number of views with same fields that why I want to do just one generic view.

Could you please help me

Comments

VM’s picture

generate your view with contextual filters and set the path using tokens ?

saurabh rawat’s picture

For this purpose, you need to add Contextual filter which is under Advance option of a view.

You have some options, the two most important options are:
What to do when your filter is not in the URL
What to do when your filter is in the URL

You can test contextual filter by typing value i.e name of taxonomy or id of taxonomy, whichever relation you have chosen,into the preview window and hitting 'Update Preview'.

mxr10_’s picture

hi saurabh rawat
I have already tried that and in the preview works ok, the problem is the url page when I go to www.site.com/christmas or
www.site.com/wedding which are the names of the taxonomy, cant find the page "/christmas"

saurabh rawat’s picture

If I go to /wedding then is it working or same page not found for /wedding as well.
Can you please let us know the steps so that i will replicate the issue, cause it working for my case.
I have used exposed filter as well with contextual filter

bdparker’s picture

This worked for me, but I have what I think is an odd situation going on.

I believe that when I set this view and add the contextual filters, it will apply site wide, right? It seems that on some of my pages, it's using the taxonomy to show articles (as indicated by "there are no articles to display"). On other pages, it's loading "node.tpl.php". Why? Why do only some pages use the taxonomy filter?

I know on SOME of the pages, I've added a basic page to a specific URL, so it displays that "page.tpl.php' instead. I can also note that the taxonomy for the pages which display "node.tpl.php" does exist, and isn't defaulting to the node.tpl.php because no taxonomy is found.

Is there somewhere on the dashboard where I need to specify which pages should follow this view?

Thanks,
Brendan