tips icon image

EE Insider Tips
Sponsored by EE Screencasts

ExpressionEngine mini-howtos created by the EE Insider community.

Tips tagged “Variables”

More precise date comparisons

Posted on June 22, 2009 by Jason Morehead

As with most EE variables, you can do comparisons on date variables, like so:

{if date_variable == "foo"}
    
Do something
{
/if} 

However, if you need more precise date comparisons, you can do something like this:

{if "{date_variable format='%m/%d/%Y'}" == "01/01/2009"}
    
Do something
{
/if} 

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

Use custom global variables in your templates

Posted on May 29, 2009 by Jason Morehead

While you can use sub-templates to contain common elements of your design (e.g., header, footer), you can also use custom global variables. For example, I often create a global variable called “analytics” that contains my Google Analytics code, and I insert this global variable throughout my

Read this tip

Search EE Insider Tips
Sponsored By