Oregon State University

Views: An Overview

Hot Topic: 
No

basic settingsBasic Information:

Name: Name of the view, this is not the heading that will appear on the page but rather the internal name of the view that will be displayed in the ‘Views List'.

Access: You can use the ‘Access' section to restrict who can and can not see the view. If any boxes are checked only the checked roles will be able to see the view. If no boxes are checked there are no restrictions and everyone will be able to see the view.

Description: The ‘View Description' is a short bit of content that contains information about what the view is or contains. The description will only be shown in the views list along with the ‘Name' value listed above, and not on the actual view itself.

 

Choosing Page/Block/ or Both:

Page View: A page view resembles a normal static page in appearance; however the content is dynamically pulled together based on the settings for the view. A page view stands on its own as a page, you can specify a url, and link directly to the view, unlike a block view which must be contained within an existing page. A page view can be customized in how it displays nodes, how many nodes to display on the page, and whether or not to use a pager to create additional pages automatically as the need arises. Each of these settings will be explained below.

Block View: When you select a block view, a block, just like any other block, is created. The block then is the container for the view. Like the page view, the number of nodes and the order in which they are displayed are all customizable. A block, unlike a page, is not self standing so it will need to be placed in one of the content areas. This is handy for reusable content as it allows the same view to be used repeatedly on many different pages.

Choosing Both: In some cases it is useful to take advantage of both the page and the block view. This is possible to do by simply checking both the page and the block view options. This will allow you to have both the stand alone page as well as the reusable block. Both the page and the block can have their own unique settings in terms of the number of nodes to display in each, but they will share any display fields, filters, arguments, and sorting. There is also the possibility of have a "more..." link within the block that then points to the page view.

Display Settings:

View Types

View Types:

View Types allows you to select the method in which the nodes will be displayed within the page/block. There are several options allowing you to display the nodes in any form; from the full node, to just a teaser, or even just a list of nodes. Each view type has different uses and choosing a view type will depend upon the desired application of the view.

 

Title:

The title heading that will appear at the top of the page/block containing the view.

 

Pagers (Page View only):Pager

Pagers are the page links with the next and previous links that you may occasionally see near the top or bottom of pages. This option enables/disables the use of pagers and the automatic creation of extra pages to hold overflowing nodes once the ‘Nodes per Page' number is reached. For example if the ‘Nodes per Page' are set to 10 and there are 15 nodes to be displayed, and pagers are enabled, then the first ten nodes will be displayed on the main view page. The remaining 5 would be displayed on a second page that is automatically created and links to navigate between the pages would be added to both pages automatically.

 

Nodes per Page:nodes per page

Specify the number of nodes to display within the page/block. If using a page view with pagers enabled this will be how many nodes to show on a page before it flows over to a new page. If pagers are not activated the value given will limit the number of nodes visibile to the user.

 

Nodes per Block:

Functions about the same as the 'Nodes per Page', however blocks do not use pagers so assigning a value to the 'Blocks per Page' field will function the same as a the 'Nodes per Page' with 'Pagers' turned off. Thus the number of nodes you specify will be all the user sees.

 

[More] Link (Must be using both a page and a block view):[More] Link

If you are using both a page and a block view, the ‘[More]' link will be displayed within the block as a link to the page version of the view. This is handy if you only want to put a few of the most recent highlights in the block and then direct the user to a page that has the full list of news stories for them to read.

 

Header:

The ‘Header' is an optional field that would contain content that will be displayed at the top of the view. The content can be anything from a short message to the user regarding the content, links, etc.

 

Footer:

The ‘Footer' is an optional field that would contain content that will be displayed at the bottom of the view. The content can be anything from a short message to the user regarding the content, links, etc.

 

Empty Text:

The ‘Empty Text' is an optional field that would contain content that will be displayed in the event there are no nodes that match the set filters or arguments for the view. The content can be anything from a short message to the user regarding the content status, links to where they can find similar content, etc.

 

Menu (Page View Only):

Provide Menu: If checked a menu item will be created for the view. If this option is not selected none of the following options will be applicable.

Provide Menu as Tab: If checked the menu item created will be a tab rather than a standard link within the menu system.

Tab Weight: Weight to be given to the menu item if it is displayed as a tab. The more negative the number the farther to the left it will be displayed in relation to other tabs, the larger the number the more to the right. Weights range from -10 to 10.

Menu Title: The title to be displayed for the menu item. If this field is left blank than the page title will be used.

Make Default Menu Tab: If checked this view's menu entry will be provided as a tab, and will be the default tab for that URL path. For example, if the URL is 'tracker/all' and it is set as the default menu tab, it will be put into the menu as 'tracker' and 'tracker/all' will be the default tab. The following settings allow you to customize the parent item, for example 'tracker'. For tabs to work properly, one tab in the group must be set as the default.

Parent Menu Item Type: Select type of parent item to use for this default menu tab. You can either specify the parent should be a tab (the default), a normal menu item, or to use the menu item that already exists at the specified URL. For example, if the URL for the default tab is 'tracker/all', then 'tracker' would already have to be a valid menu item to use this final choice.

Tab Weight: If the parent menu item is a tab, select the weight; lower numbers will be further to the left. Higher numbers will be further to the right.

Parent Menu Item Title: If the Parent Menu Item is being defined by this view (if you set the Parent Menu Item Type to either Tab or Normal menu item), you can specify its title here. If blank, the menu title will be used if that is defined, or the page title if not.

 

Content Settings:

Advanced options

Fields:

‘Fields' are only applicable if you have set the ‘View Types' to list or Table View. ‘Fields' allow you to specify which parts of the node will be displayed and also in what order they will appear to the user.

 

Arguments:

‘Arguments' are used if you want to pass certain things to views, or make them look a certain way. ‘Arguments' are a lot like ‘Filters' in that they have a set of specifications the data must meet in order to be displayed. However, ‘Arguments' can be used to dynamically filter the content the view will display while ‘Filters' are static.

 

Filters:

‘Filters' are used to filter out what content will be displayed within the view. You can specify numerous ‘Filters', for example you can filter out and display only nodes that are published and of a certain type. ‘Filters' also have the option to be exposed which will be talked about in the ‘Exposed Filters' section.

 

Exposed Filters:

If your view has ‘Filters' in place you have the option to expose these ‘Filters' to the user. ‘Exposed Filters' show up on the view itself and allow the user a bit more control over what they see by allowing them to choose the options of the filter themselves. For example, you could expose a ‘Filter' of dates and allow the user to choose which date they would like to see content from.

 

Sort Criteria:

The ‘Sort Criteria' determines how the nodes will be ordered within the view and displayed. You can select from numerous options for the ‘Sort Criteria' to first tell Drupal what piece of the node to use for sorting. Then you would specify how you want it sorted, either ascending or descending. You also have the choice of a random option that will randomly display the nodes. ‘Sort Criteria' allows for more than one criteria, sorting will be handled from the top down with the topmost sort criteria being handled first and the so on down the list.