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:

All other Modules /

Discuss all other Modules here.

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

Extend Page with SilverSmith


Go to End


2 Posts   1115 Views

Avatar
fabioC

Community Member, 3 Posts

2 May 2013 at 9:14pm

Edited: 02/05/2013 9:25pm

How can I extend the default Page (mysite/code/Page.php) with SilverSmith?

my _project.yml file:

PageTypes:
--Page:
----Fields:
------SubHeadline: {CMSField: Text}

Where should I insert the code delimiters that SilverSmith won't destroy the default Page.php? I use SilverStripe 3.0.5
Thanks!

Avatar
UncleCheese

Forum Moderator, 4102 Posts

3 May 2013 at 11:21am

Yeah, this is a bit of a grey area. You have to add the delimiters manually. Ultimately, I think a better solution would be for SilverSmith to create a PageDecorator class for you.