An unholy trinity of Assets, CE Image and Low Variable
The below code is me pulling in an early parsed low variable using the Asset field type, into a CE image tag pair. (Creating a simple gallery interface in Low Variables).
The below works fine when I have one image in that asset field, the image is resized and all is well. When I add a second image, the tag is no longer parsed.
What am I doing wrong?
Thanks!
{exp:low_variables:pair var="var_spotgraph" multiple="yes"}
{exp:ce_img:pair src="{var_spotgraph}" width="200" height="150" crop="yes"}
<img src="{made}" width="200" height="150" alt="View Larger" border="1"/>
{/exp:ce_img:pair}
{/exp:low_variables:pair}
Replies
Low 10 Feb 2012 10:43
Try and use the Low Variables tag pair for the Assets var as if it were a variable pair in the channel:entries tag. That means you can use all the variables available by Assets: http://pixelandtonic.com/assets/docs/...
No need for multiple="yes" or having the {var_spotgraph} in there.
James 10 Feb 2012 15:54
I'm not sure if this is what you meant, but I got this working and added random sorting. Hopefully this helps the next guy as well!
{exp:low_variables:pair var="var_spotgraph" limit="1" sort="random"}
{exp:ce_img:pair src="{url}" width="200" height="150" crop="yes"}
<img src="{made}" width="200" height="150" alt="View Larger" border="1"/>
{/exp:ce_img:pair}
{/exp:low_variables:pair}
Low 10 Feb 2012 15:55
Yup, exactly what I meant. :)