Arguments in Views

Arguments were placed in the center of the page in Drupal 6. In drupal 7 it was moved and renamed as contextual filter placed under Advanced.


In Contextual filters the filter value is fetched from variables sent programmatically to the view. A regular filter could give  all nodes written by a specified user. A contextual filter for a node author would be able to display all nodes written by the currently viewed user, or the same user who wrote the currently viewed node. The concept is that contextual filters prepare a view for filtering, but the filter value is not yet determined. When the view is eventually called, it is also provided with data used to complete the contextual filters.For a contextual filter relationship has to be created. 
  • Go to structure >> views >> select the view which you want to add contextual filter.
  • Click on Advanced.
  • Click Add on Contextual Filters area.
  • From the Add Contextual Filters list, select one or more filters and click Apply and Configure Contextual Filters. The Configure Contextual Filter dialog box displays.
  • In the When the Filter Value is Not Available section, specify one of the following options:
  1. Display all results for the specified field
  2. Provide default value
  3. Hide view
  4. Display a summary
  5. Display contents of "No Results Found"
  6. Display "Access Denied"
  • If you want to specify a different behavior for certain situations, in the Exceptions section, specify a value for exceptions.
  • In the When the Filter Value is Available or a Default is Provided section, specify one of the following options:
  1. Override title
  2. Override breadcrumb
  3. Specify validation criteria
  • Click Apply and Continue.

ZenRays provide the following to make you expert
zenrays providing  drupal training in Bangalore
  1. Fully practical and project-based sessions from first class.
  2. Training by Experienced Consultants, not regular Trainers
  3. Friendly and enthusiastic faculty to clear your doubts 24X7
  4. Free Live project after the training to get you industry experience
If you want more details please visit us:
Zenrays.com Reach us at trainings@zenrays.com

Share this:

ABOUT THE AUTHOR

Ceyron Louis

Hello We are OddThemes, Our name came from the fact that we are UNIQUE. We specialize in designing premium looking fully customizable highly responsive blogger templates. We at OddThemes do carry a philosophy that: Nothing Is Impossible

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment