Understanding and Using Views Contexual Filters

Views Contextual Filters is a feature of the Views module which allows a Views to accept filtering from url, or other inputs.  This allows you to create lists that depend on conditional or user input.  There are many reasons why you may want to filter a list based on url input.  Take for example of a list of articles.  You may have many articles and wish to categorize them.  In the case of this website I'd like to be able to filter my article lists by the different Tags I give the articles.  I have several taxonomy terms, CiviCRM, Drupal, and Integration. For this article and I am going to how how to create a simple page view that will take a term name as an url argument passed to Views Contextual Filter. 

I will create a page view with the path article-listing-by-tag.  That link has no arguments after it, and the page view returns all articles.  article-listing-by-tag/civicrm lists all the articles tagged with CiviCRM, and article-listing-by-tag/drupal lists all the articles tagged with Drupal.

Goto http://[your_drupal_root]/admin/structure/views/add

  1. Enter a name, maybe "Article Listing by tag"
  2. Select Content from the "Show" Select Box
  3. Select Article from the "of Type" Select Box
  4. Change the Title to "Articles"
  5. Items to display: 0
  6. Uncheck the use pager checkbox
  7. Click the "Contine and edit" button
  8. Expand the "Advanced" fieldset in the far right column
  9. Click "Add" under "Contextual Filters"
  10. Scroll down to the field shown in the image below:

 

11: Use these settings:

 

 

12. Then click apply

13. Save the view

 

You should now have a page view that will accept a term name from the Tag vocabulary

Tags: 

Comments

Regarding view contexual filter settings

Thanks you solved my problem, i setup writing content on mass communication and that time my friend ask me for this problem, accutally i make a mistake and skip following points :

  1. Uncheck the use pager checkbox
  2. Click the "Contine and edit" button
  3. Expand the "Advanced" fieldset in the far right column

But you shared full step by step that was too easy to setup Views Contexual Filters. Keep share such a helpful information.

No doubt, everyone tries much

No doubt, everyone tries much to improve their business or economics matter by applying new and latest policies but I truly find some exceptional data to manage my business. I appreciate you to manage this work but your post is truly precious for me. It is recommended to get rush essay discount in order to complete the papers without mistakes.

awesome

I’m really impressed with your writing skills and alsowith the layout on your weblog. Is thiss a paidtheme or did you modify it yourself? Anyway keep up the nice quality writing, it’s rarfe tosee a nice blog like this one nowadays.https://goo.gl/UfM9Gs

Obat Herbal Radang Tenggorokan Untuk Anak dan Dewasa

Pages

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.