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

Support archive

Low Variable Assets Field

charmingnerd 1 Feb 2012 01:48 question, complete

I just upgraded and got all the new field types. I LOVE that Assets was included - amazing.

I have a question about using variables though. I just set up an Assets field and simple put the variable in my template like this:

{catalog_image}

All that gives me for output is:

{filedir_6}catalog.png

When I use this version, it works:
{exp:low_variables:parse var="catalog_image"}

How come? I have a few other variables like {phone} and {copyright} and they work fine without the long version.

Replies

  1. charmingnerd 1 Feb 2012 05:09

    Also, does it work okay with ee 2.4?

  2. Low 1 Feb 2012 17:33

    Hi!

    It should work with EE 2.4, as far as I know.

    The reason you need the tag instead of the variable syntax is because of the extra processing. The variable syntax {catalog_image} will simply output the variable content to the page, like it does for any global variable. Using the {exp:low_variables:parse var="catalog_image"} syntax will allow the module to do some extra processing to the variable content. In this case, it will replace the {filedir_6} variable with the appropriate path.

  3. charmingnerd 2 Feb 2012 02:14

    Do you think it is okay to use the variable syntax for my other variables e.g. {copyright} and {phone}? Is there any drawback to that?

  4. charmingnerd 2 Feb 2012 06:55

    Another concern. Are you familiar with mountee?

    http://hellomountee.com/

    I just started using it and it allows you to mount your templates, snippets and global variables so you can edit them in your editor. The question then becomes - If I edit an EE global variable, will the low variable get updated? I don't want anything to be out of sync.

  5. Low 2 Feb 2012 07:59

    Only use the template tag syntax when you need the extra processing. Otherwise the variable syntax is preferred.

    Low Variables contents are stored in the native Global Variables table. It doesn't matter if you edit them using Mountee (or any other add-on). It will stay synced.