17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2235 Views |
-
Advertising module or similar.

6 June 2008 at 10:06pm Last edited: 6 June 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: http://www.pureevents.net/
.
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... -
Re: Advertising module or similar.

10 June 2008 at 8:48pm
No one done this before?. Or even something similar.
.
Please help me get in the right direction. -
Re: Advertising module or similar.

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 yoursite.com/db/build?flush=1 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.
| 2235 Views | ||
|
Page:
1
|
Go to Top |


