ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Mojo Variables - Free Addon

August 29, 2010 9:39am

Subscribe [2]
  • #1 / Aug 29, 2010 9:39am

    Phil Sturgeon

    2889 posts

    Mojo Variables let you set and call variables using Template tags. Set them in the layout and use them in your Regions (if you have that enabled) or combine with Pieces to show in sub-layouts.

    Set a variable:

    {mojo:variables:set name="foo" value="bar"}

    Get value of a variable:

    {mojo:variables:get name="foo"}

    Couldn’t be any easier right?

  • #2 / Aug 29, 2010 12:47pm

    Loic Sharma

    114 posts

    Sorry, but I don’t think I see the use of this… could you show us an example of when this could be useful?

  • #3 / Aug 29, 2010 12:50pm

    Phil Sturgeon

    2889 posts

    Setting variables in a layout or region can be very useful. If you display an email address, phone number, discount rate, etc on a site in several different places then doing this means you only need to write it once in the metadata then use it everywhere. Things like this will be more useful when tags are enabled in regions but you can either do that yourself, or wait for it to become a feature as I’m sure it will.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases