Page 1 of 1

CTLModuleMaker (again) prev/next links in detail view

Posted: Mon Dec 27, 2010 1:19 pm
by rhiaro
Having previous/next links works when calling

Code: Select all

{cms_module module="xxxx" what="yyyy" orderby="created" nbperpage="1"}
in the contents of a page, just fine, using $paginator in the details template.

However, when displaying a list view of the items with a link to the detail as so:

Code: Select all

<a href="{$item->url}">{$item->thumb->fileobject}</a>
the paginator doesn't work on the resulting details page, as the wrong parameters are being passed in the URL.

I've spent hours digging through the code, but I'm still barely getting to grips with this object oriented stuff, and I'm scared of breaking things...

Extensive Googling implies that there used to be a nice easy way of dealing with this using {$previous_item->detaillink} in the detail template, but I think this might have disappeared as of CTLMM version 2.0?

Or am I missing something?  Pointers appreciated :)

(CMSMS 1.9.2, CTLMM 2.0)

Re: CTLModuleMaker (again) prev/next links in detail view

Posted: Mon Dec 27, 2010 6:14 pm
by mw
I use:
{cms_module module="xxxx" what="yyyy" orderby="created" nbperpage="1"}
then underneath that I place:
{$pagemenu}

I don't know if that has been removed in ver 2.0, I still use the 1.8.x version

Re: CTLModuleMaker (again) prev/next links in detail view

Posted: Mon Dec 27, 2010 6:24 pm
by rhiaro
mw wrote: I use:
{cms_module module="xxxx" what="yyyy" orderby="created" nbperpage="1"}
then underneath that I place:
{$pagemenu}

I don't know if that has been removed in ver 2.0, I still use the 1.8.x version
Yes, that's essentially what I'm doing for the part that does work (I just put the paging stuff in the details template, rather than the page content).

The problem lies in calling the details from clicking a link in the list.  Although the paging is present in the template, it doesn't work, as the link from the list contains things like 'alias' which I think upset the paginator.