Published by Mijingo

movie icon image

EE Insider Blog

Spend your time learning and developing sites with ExpressionEngine and we'll use this blog to keep you informed of all the news related to ExpressionEngine and CodeIgniter.

» Read more in the Archives.

» Have a tip? Send us your EE news.

Learn ExpressionEngine Today

Over a series of 8 videos, watch and learn as Ryan builds an entire ExpressionEngine website from beginning to end. Get started now.

Updates on ExpressionEngine Conditionals

A couple of relevant updates for you on the changes with how ExpressionEngine 2.9+ handles conditionals.

Yesterday, I wrote:

Conditionals are parsed better, simple vs. advanced conditional is now a thing of the past, and there are some nice new operators; you can do simple math and more robust comparisons.

I was, admittedly, glossing over a big change in EE and one that impacts some third party developers. Fortunately, because of the Developer Preview Program all developers who participate had plenty of warning on this change. But it doesn’t mean that this will be a simple transition.

(A month ago, EllisLab wrote a good explanation of the changes to conditionals that is required reading for anyone working with EE.)

Already developers are posting updates for their add-ons to support the new conditional handling and they are trying to get the word out about how their add-ons are affected.

Low Schutte pondered:

As I wrote in last week’s Content Mgmt Outlook email:

The forever problem of moving forward versus not leaving people behind.

Low also wrote up some instructions on how to use his Low Search add-on going forward:

And Mark Croxton, the wizard behind Stash, tweeted:

Stash in 2.9 still works the same but Mark highlights an important workaround.

Mark also has an excellent explanation of the conditional parsing:

In 2.9 EE attempts to parse if/else conditionals before each pass and after the very last pass (or you can think of it as after each pass and before the very first pass), and will do so only if they are “ready” - the variables being evaluated actually exist. Previously, simple conditionals were parsed just before the first pass only, and advanced conditionals were parsed at the end of the very last pass only.

Some add-on updates may be backward incompatible (i.e. not support EE prior to 2.9), so always check the release notes before upgrading an add-on and not EE.

Posted on Jul 16, 2014 by Ryan Irelan

Filed Under: EE Add-ons, ExpressionEngine 2