Page 1 of 1

CMSMS variable gCms is not accessible from Smarty

Posted: Fri Dec 16, 2011 9:14 am
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.

Re: CMSMS variable gCms is not accessible from Smarty

Posted: Fri Dec 16, 2011 10:16 am
by pustofkj
I solved it with user defined tag. Thank you.

Re: CMSMS variable gCms is not accessible from Smarty

Posted: Fri Dec 16, 2011 12:10 pm
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).