762 Posts in 312 Topics by 291 members
| Go to End | ||
| Author | Topic: | 1398 Views |
-
Re: $SiteConfig.XX in Widget template?

2 December 2011 at 8:31pm Last edited: 2 December 2011 8:31pm
There is actually a better way Willr mentioned here:
http://www.silverstripe.org/widgets-2/show/18440
Use the following code in your widget:
function SiteConfig() {
return SiteConfig::current_site_config();
} -
Re: $SiteConfig.XX in Widget template?

13 March 2012 at 3:34am Last edited: 13 March 2012 3:34am
In PHP :
$config = SiteConfig::current_site_config(); //calling siteConfig values
$config->YouSiteConfigVariableName // get the value of the site config variable/fieldIn ss Template :
$SiteConfig.YouSiteConfigVariableName
| 1398 Views | ||
| Go to Top |


