17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 888 Views |
-
Documentation about Widgets: incomplete

17 April 2008 at 2:08pm Last edited: 17 April 2008 2:08pm
I just tried to allow Widgets on all pages by following the steps in the documentation:
http://doc.silverstripe.com/doku.php?id=widgets#adding_widgets_to_other_pages
However, this left me with a fatal error that stated that "a field called 'SideBar' appears twice in your form". This happens because I also have the blog module installed, which itself installs the field "sidebar" again.
The solution is to uncomment the appropriate line (30 in the current version) in the "BlogHolder.php":
$fields->addFieldToTab("Root.Content.Widgets", new WidgetAreaEditor("SideBar"));Could you please add this to the documentation?
-
Re: Documentation about Widgets: incomplete

17 April 2008 at 3:04pm
Hi,
Anyone can edit and write to the documenation! You can sign up and click edit page and add your thoughts / changes!.
But your fix to uncomment that line.. is it even commented out in the first place? On my version its not and and doubt it should be. '
The proper fix maybe would be to rename that field in the documenation so we dont get a conflict (2 fields called SideBar which im guessing the error is?)
-
Re: Documentation about Widgets: incomplete

17 April 2008 at 3:31pm
Ive updated the wiki, I have tried to explain it but if you have a better way to explain it feel free to write it down
-
Re: Documentation about Widgets: incomplete

17 April 2008 at 4:24pm
Sorry, I meant that this line should be commented out, you're right.
The fix with renaming the field does not produce an error when displaying the site, however it produces the "Available Widgets" area twice in the blog management in the CMS. Thus, the appropriate line has to be commented out one way or the other. To prevent braking the blog template I would recommend keeping the name "Sidebar" though.
| 888 Views | ||
|
Page:
1
|
Go to Top |


