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.

All other Modules /

Discuss all other Modules here.

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

Extend Page with SilverSmith


Reply


2 Posts   665 Views

Avatar
fabioC

Community Member, 2 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, 4096 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.