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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
Gillian.Hesse
Forum Members
Forum Members
Posts: 37
Joined: Thu Nov 08, 2007 1:29 pm
Location: Nijmegen, NL

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

Post 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
Last edited by Gillian.Hesse on Thu May 15, 2008 4:46 am, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post by calguy1000 »

{$gCms->config.root_url}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Gillian.Hesse
Forum Members
Forum Members
Posts: 37
Joined: Thu Nov 08, 2007 1:29 pm
Location: Nijmegen, NL

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

Post by Gillian.Hesse »

Thanks calguy, much appreciated.

Gill
Post Reply

Return to “CMSMS Core”