Page 1 of 1

LISE action category and pagelimit

Posted: Tue Feb 11, 2020 7:53 pm
by timdebuurman
Hi,

In LISE I use categories (and sub-categories).
Once clicked on a categorie, the items of that category are showing, as expected.

Now I want to set a pagelimit, but that doesn't seem to work with action='category'.

Does anyone can help me out on how to use the pagelimit here?

gr Tim

Re: LISE action category and pagelimit

Posted: Thu Feb 13, 2020 8:48 pm
by velden
And where do you need that page limit?

On the category overview, on the items overview (AFTER clicking the category) or both?

I'd expect the cms_module_hint tag could be of use.
https://docs.cmsmadesimple.org/tags/cms ... odule_hint

Re: LISE action category and pagelimit

Posted: Thu Feb 13, 2020 10:11 pm
by timdebuurman
Hi,

I need the pagelimit on the items overview after clicking the category.
I did indeed tried putting module_hint into the page-template to accomplish this, but with no effect. Also tried putting the tag on the page itself..

{cms_module_hint module=LISENieuwtjes pagelimit='2'}

Re: LISE action category and pagelimit

Posted: Fri Feb 14, 2020 4:05 pm
by velden
I can't get it to work either. It's like the cms_module_hint parameter is not passed to the LISE instance. Don't know why (yet)

EDIT:

Try by adding the summarypage parameter explicitly PLUS leave the cms_module_hint in place:

{LISEinstance action=category summarypage=$page_alias} (or an other page of course)

Re: LISE action category and pagelimit

Posted: Fri Feb 14, 2020 5:45 pm
by timdebuurman
Hi,

I already had the summarypage parameters set.
This is my complete tag:

{LISENieuwtjes action=category summarypage=$page_alias detailpage=$page_alias category='de-wildernis-terrein'}

Seem to do nothing..Still showing 4 items.

Maybe good to know I'm using sub-categories also.. don't know if that's the reason it breaks..

Re: LISE action category and pagelimit

Posted: Fri Feb 14, 2020 5:51 pm
by velden
And where exactly have you put the {cms_module_hint ...} tag.
I'd suggest to put it in the the 'Smarty data or logic that is specific to this page' field of the specific page the overview is displayed.

Then also make sure the PAGE template has the {process_pagedata} tag at the top.

Re: LISE action category and pagelimit

Posted: Fri Feb 14, 2020 5:57 pm
by timdebuurman
Hi,

I have had it on the main template.
Now I have put in in the ''Smarty data or logic that is specific to this page' ' and something did change, but seems fault.

Normally, the url of the category was:

/article/category-name/1/89

Now with the module hint in that place, the url changed to:

/article/category-name/1/page//2/89

Re: LISE action category and pagelimit

Posted: Wed Feb 26, 2020 8:51 am
by timdebuurman
Hi, should I make a bug-report for this?
Seems like it does not work how it's supposed to, or maybe it's not really suitible for categories and sub-categories..

Re: LISE action category and pagelimit

Posted: Thu Mar 12, 2020 9:15 am
by timdebuurman
I made a workaround for now.

Found out that the pagelimit is GET in the main LISE module (lib/class.LISEItemQuery.php)

$pagelimit = $this->GetPageLimit();

I first tried to overrule this by assigning it to a number.
But I noticed that in that case, alle instances, in both frontend as backend were limited by the inserted number.

So I made it like this:

if($_GET['art']) {
$pagelimit = intval($_GET['art']);
}

Next, I edited the url to go to in the category template and added the variable 'art' with a number: ?art=10

Maybe not many will need the use of the category action in combination with pagelimits. I shall make a bugreport, but maybe someone is helped with this temporary fix.

Nice about this fix is that it also makes it possible to change the url parameter with a frontend filter for example to change the pagelimit that way.