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   547 Views

Avatar
fabioC

2 May 2013 at 9:14pm (Last edited: 2 May 2013 9:25pm), Community Member, 2 Posts

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

3 May 2013 at 11:21am 4085 Posts

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.