Low Variables Matrix Search No Results
Hi there,
I'm having a bear of a time with what I thought would be a simple conditional. I've got a Low Variables Matrix field with several dates and custom messages. Basically the client wants to use these dates to remove their phone number on holidays and have a custom message like "Closed today - Merry Christmas!."
Here's what I'm using for testing:
{exp:low_variables:pair var='lv_holiday_message' search:date='04/08/16'}
{if '{total_rows}' == '1'}
{holiday_message}
{if:else}
TEST
{/if}
{/exp:low_variables:pair}
The first conditional always works - if one of the date columns matches the search date then my custom message gets shown. But I can't for the life of me figure out what conditional shows something when a date DOESN'T match. I've tried if:else's , total rows == 0 or empty, checking for data on just the date column itself and it never return a my TEST text.
Am I missing something simple or is this just not possible?
Replies
Low 9 Apr 2016 08:04
Have you tried using something like this? Should work just like the conditional in a channel:entries tag.
Jonathan Longnecker 9 Apr 2016 15:16
Yeah I tried no results, but Matrix doesn't support that as far as I know. Unless they added it in a very recent version.
Low 11 Apr 2016 10:55
Low Variables returns what Matrix returns, so it's technically a Matrix issue. Have you asked P&T?
Jonathan Longnecker 11 Apr 2016 15:22
Hmm..ok I'll check with them as well.
Jonathan Longnecker 21 Apr 2016 17:13
FYI, there was a bug that was stopping no_results from parsing. They sent me an updated version so it works properly now.
thanks!
Jonathan