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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

CMS field names

Go to End

2 Posts   1935 Views


Community Member, 32 Posts

7 February 2009 at 3:02am

I saw an old post in the archive that referenced "doing a print_r of getCMSFields()" to get the variable names of all the fields 'parent' fields in the CMS. Does anyone have a copy of this list to post, or can anyone show me how to use this print_r to generate the list??


Forum Moderator, 922 Posts

13 February 2009 at 9:46am

Edited: 13/02/2009 9:47am

When on the Page class, or a subclass of, you usually have something like this:

function getCMSFields() {
$fields = parent::getCMSFields();


$fields->addFieldToTab('Root.Content.Main', new TextField('Author'));

return $fields;

The Debug::show($fields) will show you all fields that were automatically added in the CMS, and you can manipulate those as necessary, removing fields that you don't want or adding new ones.