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.

New in 2.0: Preload Replace

The handy {assign_variable} variable has been removed from ExpressionEngine 2.0. In its place is a less elegantly named variable: {preload_replace}.

The variable works just the same as before, allowing you to easily do a text replacement inside of a template. Typically, this is used to set a channel name at the top of the template and then use it throughout (you see this in the default RSS template from 1.6.8).

So, instead of

{assign_variable:foo="bar"

EE 2.0 now uses

{preload_replace:foo="bar"

I don’t know what the thinking behind the name change was (improved clarity of what exactly it does, perhaps?) but it’s worth noting since the {assign_variable} variable will no longer work in 2.0.

Posted on Dec 07, 2009 by Ryan Irelan

Filed Under: ExpressionEngine 2

johnniefp03:36 on 12.07.2009

I thought assign_variable was very badly named, it was never a variable, it was immutable. Caused me a day of headbanding once when I started out with EE.

I’m glad of the name change, it’s much clearer now.

Jack McDade03:43 on 12.07.2009

I agree with Johnniefp, it was fixed data, not a variable. Now semantically correct!

Ryan J. Bonnell09:25 on 12.07.2009

If assign_variable is deprecated in EE 2.0, then the Quick Reference Chart needs updated to reflect this change, correct?

http://expressionengine.com/public_beta/docs/quick_reference.html