Jump to:

794 Posts in 409 Topics by 304 members

Widgets

SilverStripe Forums » Widgets » Add an WidgetArea to the Database to store the widget details.

Discuss SilverStripe Widgets.

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

Page: 1
Go to End
Author Topic: 1871 Views
  • pmg
    Avatar
    Community Member
    10 Posts

    Add an WidgetArea to the Database to store the widget details. Link to this post

    Add an WidgetArea to the Database to store the widget details.
    - Can someone please explain for me how i do that?

  • joshy
    Avatar
    Community Member
    57 Posts

    Re: Add an WidgetArea to the Database to store the widget details. Link to this post

    $has_one = array('MyWidget' => 'WidgetArea');

    Explain what you need more clearly!

  • 1
    Avatar
    Community Member
    5 Posts

    Re: Add an WidgetArea to the Database to store the widget details. Link to this post

    I am the first to admit I don't know much what I'm doing here, just trying to feel my way through and learn something if I can.

    I think this might be my question also. Let me put it more clearly.

    I am trying to follow the directions in the SS Widget documentation to add a widget area to my non-blog pages. There is a part ("Add Widgets to Other Pages") where it says to add some code to mysite/code/Page.php. I have copied/pasted this into my file, but when I go to run dev/build I get an error that says:

    "Fatal error: Cannot redeclare class Page in (...)/mysite/code/Page.php on line 24"

    I know I used to have this working in a previous incarnation of my website but whatever I did to ruin it, I am not sure. I am sure it was me though.

    If anybody could offer some advice, I would sure appreciate it. There are a lot of really knowledgeable people around here, I know because if it weren't for the forums I'd've given up a long time ago.

  • 1
    Avatar
    Community Member
    5 Posts

    Re: Add an WidgetArea to the Database to store the widget details. Link to this post

    Does anybody know how to fix this? Any help would be greatly appreciated!

    1871 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.