Hi,

Anyone know of a way to add a "show all" button to a view that's using a pager? I need the user to be able to view all the results at once instead of clicking on the next button.

Thanks ahead for the help.

CommentFileSizeAuthor
#9 showall.gif26.91 KBkaicyee

Comments

dawehner’s picture

You could dynamically set $view->set_items_per_page(0); This have to happen before $view->pre_execute()

rusdvl’s picture

I need it as an option though. I need to display the pager stuff and then if the user wants to view all the options at once instead of clicking the next button, then they should be able to click on "View all".

dawehner’s picture

I know what you want, but without custom coding you are lost.fizk_:

dawehner’s picture

Status: Active » Fixed

With views3 this is possible as a exposed form.

If you cannot use it because you don't have the resources/knowledge to use it then you would need custom coding.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kristen pol’s picture

I have found the option in views 3... click on the "gear" next to the Use Pager item (make sure you have the pager set to be used). You will see "Exposed options" and a checkbox for "Include all items option".

Kristen

christian deloach’s picture

The "Include all items option" only works when the "Expose items per page" is checked. The "Expose items per page" creates an HTML form select list that will allow the user to select the number of items to display per page. Checking the "Include all items option" just adds an option to this HTML form select list to view all items but does not add a "View All" link to the pager. The only solutions I've had was to use a custom theme hook for the theme_pager() within my theme's template.php file.

leanne9’s picture

I am having the same issue as AHOY, if it is possible to include it in an exposed filter as an option, why shouldn't a simple link just show up when the exposed filter is not checked? Instead, nothing shows up at all.

kaicyee’s picture

Issue summary: View changes
StatusFileSize
new26.91 KB

Try the View Extra Pager module which adds these 2 radio buttons on the pager settings of View which will display the Showall button