Page 1 of 1

[SOLVED] How do you access the root url within a template?

Posted: Wed May 14, 2008 8:09 pm
by Gillian.Hesse
Hi there,

I need access to the root url and the upload url within a template.  I used {get_template_vars} and can see that these are both within the $gCms->config object, but can't seem to get any closer than that!


{$gCms->config|print_r}              returns Array
{$gCms->config[root_url]|print_r}  returns 1
{$gCms->config[root_url]}            returns nothing
{$gCms->config['root_url]'}          produces smart errors

Any pointers of how to do this?

thanks

Gill

Re: How do you access the root url within a template?

Posted: Wed May 14, 2008 9:50 pm
by calguy1000
{$gCms->config.root_url}

Re: How do you access the root url within a template?

Posted: Thu May 15, 2008 4:45 am
by Gillian.Hesse
Thanks calguy, much appreciated.

Gill