Page 1 of 1

[solved] ListIt2 Select rows with certain value

Posted: Tue Jan 13, 2015 12:27 pm
by HarmO
Hy,

i have a listit2 instance with products in.
Now i want to Create combined products but i can't use categories because those are used to define the product types.

So i created a multi-select field def called "productgroup".

Now i was wondering how i can generate a listing of products with a certain value in the "productgroup" field def.

I can think of a method, but i don't think it is the best one.
I thought of creating a summary template and add a {if}-statement where i check the productgroup field def for that value before printing the row.

This method however will generate a lot of entries in the memory to then only output a small portion of those. If you do this 2 or 3 times on a page, i fear it will make the page generation slow.

I also don't want to make a template for every productgroup...

who can give me some tips?

Re: ListIt2 Select rows with certain value in added, multise

Posted: Thu Jan 15, 2015 9:40 pm
by psy
From the LI2 help:
(optional) serach_*="" - Search a particular field. You can use 'title' or the alias of a field definition, e.g. search_title. Can be combined with fulltext search. Multiple search_* params can be combined.
'serach' is a typo. Meant to be 'search'.
Maybe:

Code: Select all

{ListIt2MyInstance search_productgroup="whatever" ...}

Re: ListIt2 Select rows with certain value in added, multise

Posted: Tue Jan 27, 2015 9:31 am
by HarmO
Ok, this should do the trick.

Il test it and will confirm if it works

Re: ListIt2 Select rows with certain value in added, multise

Posted: Tue Jan 27, 2015 9:41 am
by HarmO
It does the trick!

Thank you