Presentation is loading. Please wait.

Presentation is loading. Please wait.

Views: From the Beginning John Fiala Twitter: jcfiala Vintage Digital.

Similar presentations


Presentation on theme: "Views: From the Beginning John Fiala Twitter: jcfiala Vintage Digital."— Presentation transcript:

1 Views: From the Beginning John Fiala jcfiala@gmail.com http://www.jcfiala.net/ Twitter: jcfiala Vintage Digital

2 Views in Brief ● Views allows you to control how lists and tables of content are presented, without having to write any code. ● Views comes with Views UI and Views exporter, but many modules exist to extend it. ● Although Views are stored in the database, they can be exported to code by hand or with Features

3 Views is more than Nodes ● You can make a view out of: – Nodes – Comments – Files (uploaded ones) – Node Revisions – Terms (Taxonomy module) – Users

4 Features and Context ● Features is a way to store Views in code easily along with associated fields, nodes, and the like. ● Context is a little like the blocks screen on steroids. Given a set of conditions, display your blocks where you need them.

5 Views Basics ● Style determines how the view is presented ● Fields indicates which fields are displayed in what order ● Sort criteria restricts the order ● Filter restricts which items are shown ● Basic Settings helps define a view generally.

6 Views Displays ● Views come with a Default Display, but additional displays can be added easily, and then customized by overriding parts of the Default. ● Block and Page are obvious ● Attach lets you add two views together ● Feed creates an RSS feed, like a Page ● Other displays can be provided by modules, like the Calendar module

7 So, Let's Make Some Views ● Demo

8 Arguments 1 ● An Argument is like a Filter, only the Argument's restriction depends on where the view is appearing on the site – specific page or context – and a Filter's restriction is fixed when the view is created. ● A filter says, “Only show type 'Artist'” ● An argument says “Show Artist 34 because we're on node/34”

9 Arguments 2 ● Page Views can get arguments from the path easily with the % wildcard. ● Other views can look at the current node, current user, or even delve into PHP for fancy results.

10 Argument View Demo

11 Relationships ● Relationships let you follow a connection between two items and bring the second item into the view. ● So, you could bring in the Artist Name from the Artist that an Album is referencing.

12 Relationship Demo

13 Useful Views Additions ● Views Bulk Operations ● Views Custom Field ● Views Attach ● Views Slideshow / Views Carousel ● Views Calc ● Ubercart Views ● Views OR ● Calendar


Download ppt "Views: From the Beginning John Fiala Twitter: jcfiala Vintage Digital."

Similar presentations


Ads by Google