04/02/2014 11:01pm

PHP | Problem - File->ShowInSearch (context: http://www.silverstripe.org/general-questions/show/38831)


<?php

// In mysite/code/extensions/CustomFileExtension.php
class CustomFileExtension extends DataExtension {
function updateCMSFields(&$fields) {
$fields->push(new CheckboxField('ShowInSearch', 'Show in Search?'));
}
}

// In mysite/_config/extensions.yml
File:
extensions:
- CustomFileExtension


Post Comment