Dynamically Disabling Pagination

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
13 years 4 months ago #3045

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:

if($this->params->get('show_limit') && $this->pageInfo->elements->total){
to:
if($this->params->get('show_limit') && $this->pageInfo->elements->total > 5){

Is there a better way?

Last edit: 13 years 4 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.

  • Posts: 81598
  • Thank you received: 13082
  • MODERATOR
13 years 4 months ago #3047

It's perfect like this :)

Please Log in or Create an account to join the conversation.

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
13 years 4 months ago #3289

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:

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.058 seconds
Powered by Kunena Forum