Yet another CTLMM problem: pagination with different parents

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Martijn van Turnhout
Forum Members
Forum Members
Posts: 52
Joined: Fri Nov 06, 2009 2:30 pm

Yet another CTLMM problem: pagination with different parents

Post 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!
klenkes
Power Poster
Power Poster
Posts: 307
Joined: Mon Sep 08, 2008 9:43 am

Re: Yet another CTLMM problem: pagination with different parents

Post 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
Martijn van Turnhout
Forum Members
Forum Members
Posts: 52
Joined: Fri Nov 06, 2009 2:30 pm

Re: Yet another CTLMM problem: pagination with different parents

Post 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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Yet another CTLMM problem: pagination with different parents

Post by Dr.CSS »

Why don't you just use the Products module?...
Martijn van Turnhout
Forum Members
Forum Members
Posts: 52
Joined: Fri Nov 06, 2009 2:30 pm

Re: Yet another CTLMM problem: pagination with different parents

Post 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.
Martijn van Turnhout
Forum Members
Forum Members
Posts: 52
Joined: Fri Nov 06, 2009 2:30 pm

Re: Yet another CTLMM problem: pagination with different parents

Post by Martijn van Turnhout »

Anybody have any idea?
Post Reply

Return to “Modules/Add-Ons”