LV asset values
Hi, I'm trying to pull out an image set as an LV with alt text. I've read this thread https://getsatisfaction.com/low/topic... but it doesn't seem to work for me and I don't get a {url} although I can get just the {alt_text}.
This is my test code:
{exp:low_variables:parse var="lv_image_not_available"}
url = {url} and alt = {alt_text}
{/exp:low_variables:parse}
This also works on it's own and does give me the image URL:
{exp:low_variables:parse var="lv_image_not_available"}
but this does not work
{exp:low_variables:parse var="lv_image_not_available:url"}
It's running inside a channel entries tag inside cartthrob if that's any help.
Apologies for potentially daft question, but I've been searching around for a while for an answer and am getting a bit stuck.
Thanks!
Replies
Low 12 Jul 2012 13:03
Hi,
Using the Shortcut tags like you normally would as a field type (so {assets_field:url} for example) is not supported (yet) in Low Variables. Instead, you'd have to use the first example you mentioned and use all variables available in the Primary Tag Pair mentioned here: http://pixelandtonic.com/assets/docs/...
If {url} is not working for you then, I'm thinking that might be an Assets issue.
Jamie 24 Jul 2012 18:01
I'm having the same problem, here's my code:
{exp:low_variables:parse var="lv_about_image"}
<img src="{url}" alt="{description}" width="{width}" height="{height}" />
{/exp:low_variables:parse}
I'm not using Assets just the basic File Manager.
{lv_about_image} works fine.
Low 24 Jul 2012 19:10
Hi Jamie. The native basic Select File variable type doesn't support that, I'm afraid. Regular var syntax only.
Jamie 24 Jul 2012 20:48
Hi Low, thanks for the response.
So does that mean I can't get any of the standard values from an LV selected image?
Low 24 Jul 2012 20:51
I'm afraid so. As the docs explain, the value for a Select Files variable type is the full url to the file.
Adding support for additional properties sounds like a good feature request, tho.
Jamie 24 Jul 2012 21:06
Yeah, I did read the docs first. I just found these responses that mention Assets and assumed that it was possible for standard Select Files too since Assets presents it like an extension of the basic EE version.
Thanks and great add-on by the way.