Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pagination (if not needed) on search results list #15

Open
christianseel opened this issue Aug 19, 2013 · 0 comments
Open

Remove pagination (if not needed) on search results list #15

christianseel opened this issue Aug 19, 2013 · 0 comments

Comments

@christianseel
Copy link
Contributor

I'm not sure if this works for everyone, but in my case I don't need a pagination on the search results if there is only 1 page...

I got it by adding an IF to L147 in the search.class.php controller file:

            if ($end < $searchResponse['total']) {
                /* get pagination */
                $this->discuss->hooks->load('pagination/build',array(
                    'count' => $searchResponse['total'],
                    'view' => 'search',
                    'limit' => $limit,
                ));
            }

If you think some people would like to have a pagination when there's only 1 page - do you have a nice way to have this customizable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant