1

I've setup some time ago a search field for matrix like so

{matrix_field search:matrix_col_01="value"} {Title}... {/if}

But now i need to add an extra value from a checkbox

{matrix_field search:matrix_col_01="value_from_checkbox" search:matrix_col_02="value_from_checkbox"} 
     {Title}... 
{/if}

The problem now is i don't see any values unless checkboxes from matrix_col_01 AND matrix_col_02 are checked.

Is it possible to to have value_one AND/OR value_two ?

The reason why i need this is to return certain rows only that contain value_01 or value_02 , i don't want to show all rows in one time. Thanks!

1 Answer 1

1

You'd need to break it out into a regular conditional statement where the two search results are compared with the OR operator:

{if '{matrixfield search:matrix_col_01="value_from_checkbox"}' || '{matrixfield search:matrix_col_02="value_from_checkbox"}'}
    {title}
{/if}
2
  • Hi Ian thanks for the the answer, but this doesn't seem to work it returns nothing at all. i've tried the following {matrixfield} {if ...} .. {/if} {/matrixfield} and {if ..} {matrixfield}..{/matrixfield}{/if} but still nothing
    – Visual
    Commented May 2, 2013 at 9:46
  • Perhaps also to know that i've done this {matrixfield search:column="checkbox_value" search:column="checkbox_value"} ... {/matrixfield} that does work if both values are true ofc
    – Visual
    Commented May 2, 2013 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.