[solved] ListIt2 Select rows with certain value

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

[solved] ListIt2 Select rows with certain value

Post 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?
Last edited by HarmO on Tue Jan 27, 2015 9:42 am, edited 1 time in total.
Kind regards,
HarmO
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

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

Post 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" ...}
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

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

Post by HarmO »

Ok, this should do the trick.

Il test it and will confirm if it works
Kind regards,
HarmO
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

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

Post by HarmO »

It does the trick!

Thank you
Kind regards,
HarmO
Post Reply

Return to “Modules/Add-Ons”