Dynamically Disabling Pagination

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
14 years 2 weeks 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: 14 years 2 weeks 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: 83024
  • Thank you received: 13404
  • MODERATOR
14 years 2 weeks 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
14 years 2 weeks 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.056 seconds
Powered by Kunena Forum