Low Search and Stash
Hi Low,
I know you may tell me to sod off, but I'm having an issue with Low Search + Mark Croxton's Stash module.
I wanted to ask about the {absolute_results} tag. As far as I'm led to believe Stash just outputs the tags inside and stores them for later.
For example
{exp:stash:set parse_tags="yes"}
{stash:results_rows}
{exp:low_search:results query="{last_segment}" limit="10" disable="categories|member_data"}
{title}
{stash:absolute_results}{absolute_results}{/stash:absolute_results}
{/exp:low_search:results}
{/stash:results_rows}
{/exp:stash:set}
The result of absolute_results in this situation is 10. However, if I move the Low search tags outside of the stash tags, then I get the correct number of absolute results.
Could you maybe shed some light on perhaps why this tag would return a different number? Obviously, I understand if you just shout 'GO ASK MARK' at me.
Thanks,
Rob Hodges
Replies
Low 16 Apr 2012 15:41
Hi Rob,
So, you're sure this is an issue with LS in combination with Stash? Or can you reproduce it with LS only somehow?
What about replacing the LS tag with a regular channel:entries tag -- does the same issue appear?
electriclabs 16 Apr 2012 16:46
Hi Low,
I've cracked it. It wasn't actually anything to do with Stash, it was do with the fact that a channel entries tag (or a Low search tag) needs the {paginate}{/paginate} pair. Even if there are no tags inside it, it just needs that pair for absolute results to work.
Now I need to get the last 2 hours of my life back :/
Thanks,
Rob
Low 16 Apr 2012 16:48
Good to hear! Sorry I can't help you with those 2 hours, tho. ;)