0

I'm trying to have a matrix field display a fallback row if there are no results from the search parameter. The field contains some copy that changes depending on the language of the site being viewed.

Here is my current code where the low_variable is a matrix field:

{exp:low_variables:pair var="lv-location" search:language="={transcribe:language_abbreviation}"}
    {copy}

    {if '{total_rows}' < '1'}boo{/if}
{/exp:low_variables:pair}

The if total rows condition is not returning anything.

Ultimately what I need is to have the copy display depending on the language currently being view ({transcribe:language_abbreviation}) but if there is no translation available then default to English which would have {transcribe:language_abbreviation} == en

Is this possible?

  • Is 'language' your Matrix field within Low Variables? – Ian Jun 18 '13 at 23:08
  • lv-location is the matrix field. "language" is the cell inside the matrix where you choose the language of the copy. – CreateSean Jun 19 '13 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.