Page 1 of 1

Yet another CTLMM problem: pagination with different parents

Posted: Tue Apr 13, 2010 11:50 am
by Martijn van Turnhout
Hi,

to be honest, CTLMM is driving me nuts with so many bugs. Yet, it's the only CMSMS module which fits my needs. Anyways, this is my problem:

I've made 1 module with 6 different parents now. The children are NOT shared.

I've created 6 pages in CMSMS, which contain placeholders like {cms_module module="producten" parent="Compacte-aggregaten-1-tot-10-kVA"} and {cms_module module="producten" parent="Geluidsarme-lasaggregaten"}.

My list_default template looks like this:

Code: Select all

{if $itemcount > 0}
<div id="product_container">
{foreach from=$itemlist item="item"}
{cms_module|indent:2 module="producten" listtemplate="final_default"}
{/foreach}
</div>
{if $page_pagenumbers}
<p class="pagenumbers">{$page_pagenumbers}</p>
{/if}
{else}
<p>Geen resultaten.</p>
{/if}
Whenever I turn on pagination, it shows the other parents on the other "paginated" pages! So, basically, it uses the pagination to switch from parent to parent. While my intention is use the paginated pages to show what only 1 parent contains!

So what am I doing wrong? Thanks in advance, 'cus this is bugging me like hell!

Re: Yet another CTLMM problem: pagination with different parents

Posted: Tue Apr 13, 2010 3:43 pm
by klenkes
I'm not quite shure what you are trying to do in your template.

You call your module with a parent and it should list items, but then in your foreach loop you call the module with a listtemplate for the final view.
What is the output from the foreach loop?
If you only want to show 1 item why don't you use the parameter limit='1' for example?

Or perhaps I misunderstand what you are trying to do.
I had a long fight with CGCalender today...

Bernd

Re: Yet another CTLMM problem: pagination with different parents

Posted: Tue Apr 13, 2010 4:38 pm
by Martijn van Turnhout
This is the content of the final_default template:

Code: Select all

<div class="product">
  <h2>{$item->name_prod}</h2>
  {$item->image_prod->image}
  <p><a href="{$item->datasheet_prod->url}" class="external">Download datasheet</a></p>
  <ul>
    <li>{$item->feat1_prod}</li>
{if $item->feat2_prod != ""}
    <li>{$item->feat2_prod}</li>
{/if}
{if $item->feat3_prod != ""}
    <li>{$item->feat3_prod}</li>
{/if}
{if $item->feat4_prod != ""}
    <li>{$item->feat4_prod}</li>
{/if}
  </ul>
</div>
Basically: I want to generate a product overview, with a maximum of 8 products on each page. But when I put pagination on, each other paginated page contains the content of other parents. That's the problem.

Re: Yet another CTLMM problem: pagination with different parents

Posted: Tue Apr 13, 2010 5:13 pm
by Dr.CSS
Why don't you just use the Products module?...

Re: Yet another CTLMM problem: pagination with different parents

Posted: Tue Apr 13, 2010 5:16 pm
by Martijn van Turnhout
The site is about to go live in a couple of days. The client has already filled the database with his products. It's a bit too late to choose another option.

Re: Yet another CTLMM problem: pagination with different parents

Posted: Wed Apr 14, 2010 1:00 pm
by Martijn van Turnhout
Anybody have any idea?