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.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Advertising module or similar.

Go to End

3 Posts   2724 Views


Community Member, 8 Posts

6 June 2008 at 10:06pm

Edited: 06/06/2008 10:08pm

Hey guys,

Just wondering if anyone has a solution for me. I am trying to display content "images and/or text" here and there on a website built with Silverstripe. However i can´t seem to figure out how i will display the content.
In the past i have used advertising modules to display this content in other CMS´s i have worked with. Where i create the space, inert the content, either image, link or just plain text then insert a variable in the template which fetches the content. Hopefully this is not too confusing ;).
Good example:
You can see in the bottom, 4 images including text, how would i display similar content editable in Silverstripe easily?.
I would really appreciate a help on this, and even better if it´s idiot proof ;). Although i have some knowledge...


Community Member, 8 Posts

10 June 2008 at 8:48pm

No one done this before?. Or even something similar.
Please help me get in the right direction.


Forum Moderator, 5523 Posts

10 June 2008 at 9:14pm

Depending on what you need to do like the Pure Events site - 4 boxes - you can do it simply by adding 4 HTMLEditor area to your page.

If you want ads on every page you can Open up page.php and add something this like ..

Add this to your static $db array

'BannerAd1' => 'HTMLEditor'

then add a tab in the CMS to edit it..

function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.BannerAd", new HTMLEditorField("BannerAd1", "Banner"));
return $fields;

Then if you go to and make sure it creates the new field and then reload your CMS you should have a new tab in the content area called Banner with a text box that your can add content - images, text, links etc etc.

All you then need to do is use $BannerAd1 somewhere in the templates to render the add.