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.

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   1416 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.