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.

Customising the CMS /

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

GridField shows related page. Why?

Go to End

3 Posts   834 Views


Community Member, 141 Posts

13 September 2012 at 6:40am

I am developing my first SS3 website and implemented a GridField. It was pretty tough, since this new concept isn't documented well in my opinion.

Anyway, I think it is working now, but why is there always a dropdown showing the current page? I didn't tell SS to show this field and I don't know how to remove it.

For example …
In chapter 5 of the SS tutorial the page "Developer Toolbar" has a GridField attached and when I edit an item at the bottom it shows the field "Project". Without any purpose. I can't even edit/change it.

Is this a bug?


Community Member, 473 Posts

13 September 2012 at 8:47am

This is because the default getCMSFields() method includes fields for every relation on the DataObject, including the one that GridField manages. You can remove it by defining a getCMSFields() method on your DataObject that looks something like:

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


Community Member, 141 Posts

14 September 2012 at 4:40am

Cool. Thanks for your reply. Works!