Published by Mijingo

tips icon image

EE Insider Tips
Sponsored by Mijingo's EE 2 Screencasts

ExpressionEngine mini-howtos created by the EE Insider community.

Tips tagged “Assign Variable”

Make assign_variable conditional

Posted on June 01, 2009 by johnniefp

I’m sure we all use assign_variable at the top of our templates, with a name like assign_variable you’d think you could do something like this:

{if segment_2 == ""}
  {assign_variable
:my_weblog="apples"}
{if
:else}
  {assign_variable
:header_image="{segment_2}"}
{
/if} 

Well you can’t! if you read

Read this tip

Use variables in CSS that’s generated by EE

Posted on May 29, 2009 by Philip Zaengle

Sometimes it’s great to use ExpressionEngine to manage CSS, sometimes not. But when I do it’s a great help to use variables in the css document. You can use this for everything from setting colors, fonts, or even debugging.

Often times the same color is used over and over again in a stylesheet. To

Read this tip

Search EE Insider Tips
Sponsored By