CMSMS variable gCms is not accessible from Smarty

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
pustofkj
Forum Members
Forum Members
Posts: 19
Joined: Fri Feb 04, 2011 1:57 pm

CMSMS variable gCms is not accessible from Smarty

Post by pustofkj »

Hi, I think my Subject is saying everything. Here, in User Handbook is written that {$gCms} is available from smarty. So I can access anything of config file from smarty, can't I?

But when I write {$gCms->config.root_path} in my template, I've got nothing. Because of it I tried to execute {$gCms|var_dump} and cmsms responds "NULL".

How can I get root_path from smarty? Thank you.
pustofkj
Forum Members
Forum Members
Posts: 19
Joined: Fri Feb 04, 2011 1:57 pm

Re: CMSMS variable gCms is not accessible from Smarty

Post by pustofkj »

I solved it with user defined tag. Thank you.
winkelman
Forum Members
Forum Members
Posts: 32
Joined: Sun Dec 19, 2010 9:05 pm

Re: CMSMS variable gCms is not accessible from Smarty

Post by winkelman »

pustofkj wrote:Here, in User Handbook is written that {$gCms} is available from smarty. So I can access anything of config file from smarty, can't I?
The wiki must be rewritten - $gCms->config was removed, you have to use cmsms()->GetConfig() instead ;) (see announcement for CMSMS 1.10).
Post Reply

Return to “CMSMS Core”