Closed brasileric closed 8 years ago
Hmmm, I can't get this working on a test site either... Your code looks right though. I'll let you know if I figure it out. Alternatively, you could extend the page and dataobjects, but what you're trying to do is a much better method.
This is because you're not calling parent::getCMSFields() which contains the call to $this->extend('updateCMSFields', $fields);
updateCMSFields() isn't getting called.
Simple fix: $fields = FieldList::create(...); $this->extend('updateCMSFields', $fields); return $fields;
This issue is fixed in pull request https://github.com/andrewhoule/silverstripe-photogallery/pull/3
I just tested with the new pull request, the fields will show now.
Looks like this is resolved in #3 perhaps close out this issue :D
I want to add extra fields to PhotoItem dataobject by using dataextension. Below is my code, the extra fieds has been added to the database table, but in the cms the form fields doesn't appaer. Any idea what can be the cause? I added the dataextension to my config.yml as well and did /dev/build?flush=all
<?php
class CustomPhotoItem extends DataExtension {
}