Use Pager

For lists that will contain dozens or hundreds of items, you can limit the number that appear on a page (usually to 10 or so) and use a "pager" at the bottom of the page instead. A pager looks like this: << previous 1,2,3,4,5,6,7... next >>. Visitors use the pager to navigate through all of the items. Views automatically creates and displays the appropriate pager based on the number of items that are in the complete list. By default, the Views module renders lists using a pager with 10 items per page. You can change this by clicking on the "Paged, 10 items" value. You'll see a list of four options (shown in Figure 11-4). "Display a specified number of items" allows you to specify how many content items will be displayed without a pager being rendered. You might want to use this approach when you only want to list the first three items. I've used this option in cases where I want to display only the last three items created on the site in a "What's New" block. "Display all items" lists every content item that meets the criteria specified in the view definition. This option works well for situations where there are fewer than 25 content items in the list. More than 25, and visitors are unlikely to scroll through them all. "Paged output, full pager" results in a list of items (say, 10 items) followed by a pager. A full pager lists other options, such as "Jump to the start of the list," "Jump to the end of the list," "Previous," and "Next." The "Paged output, mini pager" is similar to the full pager, but only provides navigational controls for previous and next.

Defaults: Selcct which pager, if any, to use for this view

O Display a specified number of items Q Display all items 0 Paged output, firli pager Q Paged output, mini pager

Uodate Cartel

Figure 11-4. Pager options

0 0

Post a comment

  • Receive news updates via email from this site