Using dynamic prefixes with Low Variables
I've got a Low Variable set up with a Matrix field type. The Matrix field is filled with entries from a few different channels (News, Events, and Standard Sub Pages). All three of these channels contain a Playa field named "_syndication_details" with a prefix that matches the channel's short name. So, for example:
news_syndication_details
events_syndication_details
standard_sub_pages_syndication_details
Now I need to be able to dynamically insert that preview when loading my LV content. Currently I'm doing this, but it's not working:
{exp:low_variables:pair var="large_feature_slideshow"}
{{channel}_syndication_details}
{entry_excerpt}
{/{channel}_syndication_details}
{/exp:low_variables:pair}
For some reason this isn't inserting the channel's short name. Instead it's inserting it's real name, so it ends up spitting something like this out:
{Standard Sub Pages_syndication_details} {entry_excerpt} {/Standard Sub Pages_syndication_details}
Is there a way around this? Sp far this is my only LV related hiccup, and I'd love to be able to get around it.
Thanks!!!
Replies
Low 29 Nov 2012 09:04
Matrix is responsible for parsing whatever's inside the low_variables:pair tag, if you're calling a Matrix variable type, so I'd suggest you'd as Pixel & Tonic as well.
Things to try: how about using {channel_short_name} instead (not sure if that's available there, tho.)?
brandon 29 Nov 2012 14:15
Thanks, Low! Yeah, your {channel_short_name} suggestion returned the properly formatted string, but it's not actually parsing anything. It's just echoing
on the front end.Thanks for the response! I'll hit up P&T.