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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

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

Extending Site Tree class not showing up in Blog Module


Go to End


1107 Views

Avatar
Optic Blaze

Community Member, 190 Posts

24 July 2012 at 9:06am

Hi there,

I extended Site Tree with the following code in the page.php file in my mysite/config:

public static $db = array(
'Colour' => 'Text'
);

The idea is to be able to assign different colours to pages by integrating and assigning css class names to it through the above variable. That works well.

The problem i have is that when i try to call $Colour when i am on any blog page, i cannot access the values. I have tried calling it as $Page.Colour as well but that also does not work.

Please help

Thanks