0

I have a taxonomy

Bubble Clouds Flower

I also have a pages where I need to be able to pull a taxonomy term (and it's fields) into the page. if the site path is abc.com/features/bubbles

I need to be able to access blubbles and it's fields.

I've created a view of taxonomy terms that lists all my terms. I can not get the contextual filter correct to display just bubbles.

Any help is appreciated.

1 Answer 1

1

Create a view, Create a page display and set it's path to features/%

Then add a contextual filter: Taxonomy term: name.

That's it! when you visit the page /features/blubbles page, if there is a taxonomy term named blubbles, the views will display the fields you have added. You may add a validation criteria (while adding the contextual filter) to limit terms to an specific vocabulary.

However you might want to consider using panels too. After enabling panels, page manager and views content panes modules, you can create a page and set it's path as features/%term (notice the arg is %term not %) set it's type as String.

  • Add a display to your view of type content pane
  • Add the contextual filter, taxonomy term: name.
  • In configuration section of the views display there is a 'argument input', open it and set type of argument from panels argumen
  • In the opened configuration popup, select second argument as the name is second parameter in your path. you may select from panels context too if you can configure the panels accordingly.
  • Go to panels configuration page, add content to one of regions, select views panes not regular views!
  • Visit the panels page, done.

This way you have more control over your page. you can create another views, such as a view directly showing nodes, filtered by a taxonomy. you can send the term name just like you sent in the views above.
In the first view it's not a good idea to show nodes if you are only planning to display the term fields only once.

This question : Contextual filter with a block view is about views blocks and contextual filters. I still suggest using pages. views content pane will play role if a block for you.

3
  • Thank you, My view is working, let it is not displaying as a block. TRying to figure out why the block can not take the info from the url
    – Baybook
    Oct 6, 2014 at 19:06
  • @Baybook blocks don't like arguments from path much! the last link describes why...
    – hkoosha
    Oct 6, 2014 at 21:07
  • Posting solution that helped. Me. Links were helpful. Be careful and make sure that you handle the configuration for dashes and lower case. That was my problem. Hours wasted for something so small that I saw in the links.
    – Baybook
    Oct 7, 2014 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.