Created
July 24, 2012 20:52
-
-
Save markterpstra/3172596 to your computer and use it in GitHub Desktop.
Low Variables Magic - Nesting, Preparsing, Var Types, etc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First I'm using the Low Variables Single tag to pull in a Textarea var type for the country-specific header, | |
using the preparse: paramter to pass the {lang} and {segment_1} vars... | |
<div id="header"> | |
{exp:low_variables:single var="lv_header_{lang}" preparse:lang="{lang}" preparse:segment_1="{segment_1}"} | |
</div> | |
Then inside the above {lv_header_{lang}} var, I have the country-specific logo, contact info, nav menu, etc. | |
For the nav menu, I'm using a Low Variables Pair tag to output a nested Playa var type... | |
<ul> | |
{exp:low_variables:pair var="lv_main_menu_{lang}"} | |
<li> | |
<a href="#"><h3>{cf_page_heading_{lang}}</h3></a> | |
<ul> | |
{exp:playa:children field="cf_page_subpage_listing_{lang}"} | |
<li><a href="/{lang}/{segment_1}/{url_title}">{cf_page_heading_{lang}}</a></li> | |
{/exp:playa:children} | |
</ul> | |
</li> | |
{/exp:low_variables:pair} | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment