1043 Posts in 379 Topics by 373 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1211 Views |
-
SilverStripe 3.0.0 - Unable to Add Fields

4 May 2011 at 2:54am
Hi,
Why are none of the specified in getCMSFields() showing up in the CMS? I can see in the changelog (http://doc.silverstripe.org/sapphire/en/trunk/changelogs/3.0.0) that "The fields and tabs are now split into two separate forms, which required a structural change to the underlying class logic. In case you have added or removed fields in the "Behaviour" or "Access" tab, please move these customizations to a new getSettingsFields() method." However, I have not added/removed any fields from the Behaviour or Settings tabs -- Only the Content tab. And I am adding new tabs as well.
Since the upgrade, I removed the ".Main" part of the tabname argument to get rid of an error, and I now have Two Content tabs, and my fields aren't showing up on either of them. What gives? How do I use/manipulate/configure tabs in 3.0?
Thanks,
Garrett -
Re: SilverStripe 3.0.0 - Unable to Add Fields

6 May 2012 at 9:30pm
Hi Garrett,
I'm just wondering if you ever figured this out? I'm also scratching my head on this one.
Peter
-
Re: SilverStripe 3.0.0 - Unable to Add Fields

8 May 2012 at 3:58pm Last edited: 8 May 2012 3:58pm
I had this problem too and forgot to post my fix.
To add fields to the main tab -
Instead of$fields->addFieldToTab('Root.Content.Main'
Just remove the .Content part$fields->addFieldToTab('Root.Main'
Similarly to add fields to your own tab -
Instead of$fields->addFieldToTab('Root.Content.MyTab'
Just remove the .Content part$fields->addFieldToTab('Root.MyTab'
Hope that helps.
-
Re: SilverStripe 3.0.0 - Unable to Add Fields

9 May 2012 at 2:10am
That more than helps, it solves ;) I figured this out just like you a long time ago though but thanks anyways for replying!
//Garrett
-
Re: SilverStripe 3.0.0 - Unable to Add Fields

9 May 2012 at 8:31am
Hi Lukereative and Garrett,
I also figured this out after posting but didn't quite get round to updating - so that make three of us. Glad the answer is here for others now though as this was the first result in my search for answers.
I'm very new to Silverstripe and have made the 'interesting' decision to try out SS 3.0 by following tutorials for previous versions so may see you around on the forum again in the future.
Peter
| 1211 Views | ||
|
Page:
1
|
Go to Top |



