Drupal Views
Views Terminology:
TITLE
String that will be used as the title in various displays. You can set different title for differnet display types - eg: you can set the title of the page to "My Articles Page" and the title of the block to "My Articles widget". You could choose to use the same title on all displays too - eg: "My Articles"
FORMAT
You can define how the matching content gets displayed on the format defintion. Possible format types include -
Grid - Content is organized by rows and columns (similar to content on news paper)
HTML List - Content is displayed one after the another (similar to the default drupal front page)
Jump Menu – Matching content is displayed in a drop down and the user may make a selection to view the appropriate content.
Table – Content is laid out in a table with the selected fields in the column.
Unformatted list – lists each matching content one by one similar to HTML list – but provides less customization options.
Each format type has additional settings which define how the content is formatted – including ability to specify custom CSS class, how fields are displayed etc.
You can choose different format for each display – example: you can use a simple unformatted list for the block display whereas the same view can have Grid type display for the page.
FIELDS
Define what content needs to be pulled for the view. These fields will be used in format to define how they are presented.
FILTER CRITERIA
Allows you to specify conditions which limit the content to specific criteria.
Filters are further enhanced by the user of “Relationships” defined later which you to add additional objects which can be used on the filter.
SORT CRITERIA
Allows you to define how the content is sorted in the display.
PAGE / BLOCK SETTINGS
Allows you to control the behavior of the container – a block or a page. You can define the name and path of the page or the block, whether the link should added to a menu, who can access the display, paging options etc.
CONTEXTUAL FILTERS
Contextual filters allow you to user parameters passed to the page (say via URL) to be used as filters.
Eg:
http://yourdrupalsite/view-page/user/user1
http://yourdrupalsite/view-page/user/user2
Assuming “user” is the contextual filter, the first URL can be used to pass “user1” as the value for the filter whereas the second URL will pass “user2” as the value.
Contextual filters need not necessarily be URL based. They can also be fixed value / based on a PHP code / based on the user account who has logged in etc.
With the help of contextual filters, you are able to setup dynamic filters for the view.
RELATIONSHIPS
Relationships allow you to define how objects are related. With this feature, you can define non-explicit relationships. Explicit relationships are defined by the views module itself – example: A node to an user – where you are able to filter nodes authored by specific user. With the relationship option, you are able to define additional relations – like a file to a node etc.
OTHER
All other miscellaneous options are grouped here.
Use AJAX – use AJAX functionality for elements like page navigation etc.
Query options – allows to override default Drupal rewrite (to include node access checks) etc.
CSS Names – Additional CSS classes that needs to be added to this display
Conclusion
The view module is a versatile way to obtain content from the Drupal system and display it on your site. A typical use case scenario would be – you want to display “Nodes authored by a specific/current user”, content on specific type to be listed on the Frontpage or other sections of the site. The features and the customizable nature of this module makes it almost a MUST have for every Drupal installation.
2 comments:
Can I simply just say what a comfort to uncover an individual who genuinely knows
what they are talking about on the internet. You definitely realize how to bring a problem to light
and make it important. More and more people ought to read this and understand this side of
your story. It's surprising you are not more popular because you surely possess the gift.
Have a look at my homepage :: http://managingdirectors.in/
Hmm is anyone else encountering problems with the images on this blog loading?
I'm trying to find out if its a problem on my end or if it's
the blog. Any feedback would be greatly appreciated.
Visit my web blog ... レイバン 通販
Post a Comment