Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class CustomFooter extends DataExtension {
- static $db = array(
- 'FooterContent' => 'HTMLText',
- );
- public static $has_one = array(
- "Logo"=>"Image",
- "BGImage"=>"Background Image"
- );
- public function getCMSFields() {
- $this->extend('updateCMSFields', $fields);
- return $fields;
- }
- public function updateCMSFields(FieldList $fields) {
- $fields->addFieldToTab('Root.Footer', new HTMLEditorField('FooterContent', 'Footer Content'));
- $fields->addFieldToTab('Root.Main', new UploadField('Logo','Company Logo'));
- $fields->addFieldToTab("Root.Main", new UploadField('BGImage','Background image'));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement