My top five ways Low Variables extends EE’s flexibility brought to you by META Q
Interior Ad 1 brought to you by The META Q

My top five ways Low Variables extends EE’s flexibility

Low Variables is an add-on that until recently I had not had the need/opportunity to use. It will likely be on my base EE install list from now on. I found Low Variables to be an incredibly simple and powerful way to increase Expression Engine's flexibility. Think of it like Pilates for your EE core.

The Low-Down on Variables.

If you're familiar with EE, you know about Snippets and Global Variables, and the limitations of such. Snippets are great for pre-replacement and dynamic chunks that you can reuse, but I find it can be cumbersome to work on these in the admin - I prefer editing in my favorite text editor. Global Variables are parsed last, and therefore, may only contain static code. Here are two methods of reusable content in two different places that don't quite satisfy the needs for reusable/global content.

The functionality of Snippets and Global Variables are rolled into Low Variables, with options galore.

  • You have the option to enable early parsing on a Low Variable, which will parse it at stage one, effectively making it a snippet.
  • You can use the template tag ( {exp:low_variables:parse var="my_var"} ) to parse at stage five just like module tags.
  • Or you have the option to not enable early parsing, to parse at stage nine, making them essentially Global Variables.

As an added bonus, you now have one place for all these types of includes/variables, and by way of Low Variables options, you can save them to the server as text file. No more editing large amounts of code in the Control Panel.


1. Admin configurations users can access

With Low Variables, it’s easy to create a variable group and assign member access. Say, for example, you wanted to create a group called “General Site Configuration” and grant access to editors (and above) that would contain the Google Analytics UA ID, whether Google Analytics is on or off (which is great during development before or after launch), and limits for channel entries tags – you could do exactly that. Designated users can access this information, but may not design templates or have access to anything else you don't want them to.

2. Global site/company Information

Global content can be a tricky issue with the EE core set-up. Creating a channel is one way to solve the problem, but it often creates far too many complications and unnecessary explanations for clients. With Low Variables you can create another group that contains the company or client name, address, phone number, etc. –  all in a place the client can easily find and edit.

3. Adding forms to entries

Low also has a Low Freeform Field add-on that when combined with Low Variables or Matrix will allow you to build (Freeform) forms on a per-page basis. No more hard-coded forms that the client cannot modify.

A list of compatible field-types can be found here.

4. Nesting entries tags

Generally, nesting tags is bad form and can cause your performance to lag. But imagine if you could parse nested tags at different stages.  Interested? It’s possible to use Low Variables parsed early to parse entries and module tags, with the Variable inside other tags at the template level. This method can be used in combination with {if no_results}.

5. Adding featured content

Featured content can sometimes be tricky in EE, especially when considering performance. Often featured content is rolled into a channel somehow, but it can add quite a few additional queries during parsing. By creating a separate variables group and pulling content directly, you can then use Low Variables tags to call that content directly, simplifying both the content addition and parsing processes.

How do you use Low Variables?

Expression Engine use is all about creativity, and the possibilities with add-ons like Low Variables are nearly endless. Have more creative uses for Low Variables? Let us know!


Mike Wenger's avatar

Mike Wenger

Front-end designer and developer at Q Digital Studio

Mike Wenger is a front-end designer and developer at Q Digital Studio. Mike’s both a left brain and a right brain kind of guy, and as such, enjoys a nice mix of design and development work. He loves being able to flex his creative muscles and work on his analytical skills. When he wants to flex his physical muscles, Mike likes to spend time in the great outdoors – hiking, biking, backpacking and kayaking.

Posted

9.18.2012

Categories

Code > Code Process > ExpressionEngine

Tags

add-ons, code

2 comments >

What others are saying

matthew carleton

I would love to hear more about the featured content point you make. I am currently getting into low variables and I am try to make better use of it.

I have a real estate site that has a featured listings section on the homepage and I am still trying to figure out the best way to go about it.

Any thoughts?

Su búsqueda incluye asimismo vídeos de youtube aunque, para
filtrar aquellos ficheros sin demasiada calidad, Songr te muestra el bitrate y ordena automáticamente los deselances acorde a
ello.


Speak your mind