Page 1 of 1
[solved] Filter listit extended content by any field
Posted: Sat Mar 08, 2014 1:49 pm
by Torpedine
Is it possible to filter the ListIt Extended content in a page by any field?
I.e. If I have a "cauntry" filed among others, is it possible to have a page listing all the records that have country="italy"?
AND
Why, when using the "filter" template, categories are not available?
Re: Filter listit extended content by any field and not file
Posted: Sun Mar 09, 2014 1:40 pm
by Stikki
Yes it is, use search action.
Here is some advanced example how Listit Extended could filter stuff:
http://www.protouch.fi/
Due different mechanic how category field work there is bug:
http://dev.cmsmadesimple.org/bug/view/9480
Re: Filter listit extended content by any field and not file
Posted: Sun Mar 09, 2014 2:09 pm
by zaidcrowe
I think it is - have you looked at the module help? Check out the search parameter.
I don;t have direct experience (yet) with the filter templates, but if an item is missing anything, you can use the smarty plugin "ListItLoader" (see the module help for the ListIt2 module itself) to grab everything/anything for a particular item:
{ListIt2Loader item='item' identifier='alias' instance='ListIt2Instance' value='myalias' assign='tmp'}
Re: Filter listit extended content by any field and not file
Posted: Sun Mar 09, 2014 2:11 pm
by zaidcrowe
@Stikki - very sweet looking site dude!
Re: Filter listit extended content by any field and not file
Posted: Sun Mar 09, 2014 2:20 pm
by Stikki
Thanks, Design ain't mine or anything, but technical solution is.
Re: Filter listit extended content by any field and not file
Posted: Sun Mar 09, 2014 5:15 pm
by Torpedine
Thing is, I cannot see in the module help how to obtain something that suits my needs, and I cannot see it from the frontend
How can I have a page that shows only the records that satisfy a condition on a field?
As I said before, for example, all the records that have the field "field" equals to "somecontent?"
To be more precise, something analogue to category filtering per page.
Thanks in advance
Re: Filter listit extended content by any field and not file
Posted: Sun Mar 09, 2014 10:14 pm
by Stikki
I think i answered your question?
Use search action.
Re: Filter listit extended content by any field and not file
Posted: Mon Mar 10, 2014 12:09 pm
by Torpedine
It's not clear. I can use search action to DO a search. What I need is to display only some kind of content on a page.
"search" - displays the search form.
Re: Filter listit extended content by any field and not file
Posted: Mon Mar 10, 2014 12:14 pm
by Stikki
{ListIt2<instance> search_<field_alias_to_search>='value_of_field'}
Re: Filter listit extended content by any field and not file
Posted: Mon Mar 10, 2014 12:44 pm
by Torpedine
Thanks! the documentation on the module help is not clear on this...