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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

changing $Content through page.php

Go to End

2 Posts   1155 Views


Community Member, 81 Posts

6 February 2009 at 4:26am


I think im asking a real simple question here but how do i change the contents of the $Content template variable through the Page.php file.

So i could run some rugular php on it like
$Content = $Content . ' hello';

Link i said i think im getting stuck on something real simple here :-(



Community Member, 791 Posts

6 February 2009 at 9:20pm

Yeah, you can overload the Content() method...

function Content() {
$sContent = $this->Content; Some nast stuff to $sContent.

return $sContent;


good luck !