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.
Share on Twitter
johnniefp — 03: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 McDade — 03:43 on 12.07.2009
I agree with Johnniefp, it was fixed data, not a variable. Now semantically correct!
Ryan J. Bonnell — 09: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