Global Variables

Discussion in 'Templates customization' started by eh1160, Jul 2, 2006.

  1. eh1160

    eh1160 Guest

    I'm really frustrated with this smarty stuff. I don't know...maybe I'm too junior a PHP developer to understand it all.

    I would like to setup a global variable, to be used in a bunch of templates and emails. I created a new site.inc.php, and thought that I could just add the variable in there...something like $dmURL = "http://www.cnn.com";. But then how do I access this variable in the email and template files? Is there another way to do this?
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    try to the following
    $config['dmURL'] = "http://www.cnn.com/";

    then in templates use
    {$config.dmURL}

Share This Page