Dynamically Disabling Pagination
- brainforge
-
Topic Author
- Offline
Less
More
15 years 9 months ago - 15 years 9 months ago #3045
by brainforge
Dynamically Disabling Pagination was created by brainforge
I wanted to remove the pagination elements when there are only a few products displayed.
The way I have done this for now is:
Change template code from:
to:
Is there a better way?
The way I have done this for now is:
Change template code from:
Code:
if($this->params->get('show_limit') && $this->pageInfo->elements->total){
Code:
if($this->params->get('show_limit') && $this->pageInfo->elements->total > 5){
Is there a better way?
Last edit: 15 years 9 months ago by nicolas. Reason: removing the php tags from the code to avoid displaying issues
Please Log in or Create an account to join the conversation.
15 years 9 months ago #3047
by nicolas
Replied by nicolas on topic Re: Dynamically Disabling Pagination
It's perfect like this
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
15 years 9 months ago #3289
by brainforge
Replied by brainforge on topic Re: Dynamically Disabling Pagination
Not quite working as I hoped.
It seems to remember limit->value, so I got into the situation where it would only display, say, 1 product out of 3 with no pagination shown. Workedaround with:
It seems to remember limit->value, so I got into the situation where it would only display, say, 1 product out of 3 with no pagination shown. Workedaround with:
Code:
if($this->params->get('show_limit') && $this->pageInfo->elements->total > $this->pageInfo->limit->value && $this->pageInfo->limit->value)
Please Log in or Create an account to join the conversation.
Time to create page: 0.184 seconds