Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions

Using variables within the CMS HTMLField


3 Posts   1027 Views


14 January 2011 at 6:04am Community Member, 17 Posts

Is is possible to enter a $SiteConfig variable within the text entered in the Content field of the CMS that will display that variable's value when the page is generated? I know how to use the variables in a template, but I wish to insert variables within the content itself.

Thanks for any help that is offered.



14 January 2011 at 11:49am Community Member, 215 Posts

Hey there welcome to SilverStripe.

Yea there a few ways to do it - best option is to use a shortcode, see;

You may find that's not quite what you're after and might want to try this:

Hope that helps :)


14 January 2011 at 1:21pm Community Member, 17 Posts

Beautiful, Howard! Works like a charm! Thank you so much!