All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Matrix Variable preparsed into another variable - works for one preparse but not the others

Sean 25 Jun 2013 20:11 problem, complete

Low,

I've got a situation where I made a matrix variable and preparsed it to another low variable - this works, but when I preparse the second and third it just outputs the the curly braces for the matrix cell.

Main Template code looks like this:

 
{exp:low_variables:single var="lv-doctype-header"
preparse:pre_default_title='{exp:low_variables:pair var="lv-home2-title" search:language="={transcribe:language_abbreviation}"}{meta-title}{/exp:low_variables:pair}'

preparse:pre_description='{exp:low_variables:pair var="lv-home2-description" search:language="={transcribe:language_abbreviation}"}{meta-description}{/exp:low_variables:pair}'

preparse:pre_keywords='{exp:low_variables:pair var="lv-home2-keywords" search:language="={transcribe:language_abbreviation}"}{meta-keywords}{/exp:low_variables:pair}'

}


In the above code lv-home2-title is successfully passed to the following template, but lv-home2-description and lv-home2-keywords do not pass through, but rather just output {meta-description} and {meta-keywords}respectively

lv-doctype-header
 
{!-- SEO Logic Here --}

{exp:ifelse parse="inward"}
{!-- listing pages need overides here--}
{if segment_2 =="" AND segment_1 !=""}
{exp:seo_lite
entry_id='{pre_entry_id}'
url_title='{pre_url_title}'
default_title='{pre_default_title}'
default_keywords='{pre_keywords}'
default_description='{pre_description}'
}
{/if}

{if segment_1 ==""}
{exp:seo_lite
default_title='{pre_default_title}'
default_keywords='{pre_keywords}'
default_description='{pre_description}'
}
{/if}

{if segment_2 !=""}

{exp:seo_lite
use_last_segment='yes'
default_title='{pre_default_title}'
default_keywords='{pre_keywords}'
default_description='{pre_description}'
}
{/if}
{/exp:ifelse}

{!-- End SEO Logic Here --}


I have successfully used this on other sites, but for some reason it's not working as expected here. The part that has me flummoxed is that the title is passed through and the others are not, but I cloned those fields from the title.

The variables that are being preparsed are further up in the CP (different group) than the doctype header variable. I've also tried turning on/off early parsing.

Please advise.

if you need CP access let me know and I'll send it on strait away.

Thanks for your time.

Replies

  1. Low 25 Jun 2013 20:56

    I think I mentioned this before, but using tags (especially tag pairs) as input for another tag's parameter values is flakey.

    Things to try: make sure the whole tag, including all parameters, are on a single line and add parse="inward" to the main one.

    Also, take a look at the template debugger to see what the tag actually does.

  2. Sean 25 Jun 2013 21:02

    Low parse="inward" appears to have done the trick.