Page 1 of 1

Products action categorylist and pagelimit ?

Posted: Mon Mar 23, 2015 4:30 pm
by pedes
I'm trying to get 9 items on a page form the categorylist.
So I thought using:

Code: Select all

{Products summarytemplate='mytemplate' action=categorylist pagelimit='9'}
But that seems not to work.

Is there a way to build it in the category list template?
The default category list template looks like this:

Code: Select all

<div class="products_category_list">
{foreach from=$categorylist item='obj'}
  <div class="products_category">
    {* category fields are available as an array in $obj->fields *}
    {* i.e: $obj->fields.fieldname.field_value *}
    {if isset($obj->fields)}
    {foreach from=$obj->fields key='field_name' item='fielddata'}
      <div class="products_category_field">
        {$fielddata.field_prompt} = {$fielddata.field_value}
      </div>
    {/foreach}
    {/if}
    {if isset($obj->detail_url)}
      <a href="{$obj->detail_url}">Details For {$obj->name}</a>&nbsp;&nbsp;
    {/if}
    <a href="{$obj->summary_url}">Products Matching {$obj->name}</a>({$obj->count})
  </div>
{/foreach}
</div>
Thank you for any idea.
Kids regards
Peter

Re: Products action categorylist and pagelimit ?

Posted: Mon Mar 23, 2015 5:37 pm
by velden
The help of Products states that the pagelimit parameter won't work for other actions than 'default' and 'search'.

So if you want pagination, you should build it yourself. Either using some kind of javascript or by using Smarty. Neither of those options is ideal but it should be doable.