Is it possible to return all pages in a collection
I would like to be able to return all pages in a collection if no search request was given. Is that possible? My alternative is to have both channel:entries and low_search:results on the same page with a conditional switch if no query was passed in.
Replies
Low 5 Dec 2011 22:47
Yes, that's possible. A keyword-less search will just return all entries in given collection.
Dan Eichholz 5 Dec 2011 23:30
My results page works well if I call it from a low_search form with some keywords. However, if I call it with no keywords or call it directly with no query, I get 0 results.
{exp:low_search:results
collection="resources"
{if freebie_4}query="{freebie_4}"{/if}
limit="100"
}
Is there anything that you could suggest to coax a result of all entries in my collection?
Low 5 Dec 2011 23:35
Try setting dynamic="no" to the low_search:results tag.
Dan Eichholz 6 Dec 2011 12:08
Thanks for your help. That did the trick.
Low 6 Dec 2011 12:10
Cool. You'll also be happy to know that for the next version, the dynamic="" parameter will be set automatically behind the scenes.