Jump to:

794 Posts in 408 Topics by 304 members

Widgets

SilverStripe Forums » Widgets » Login wdget not shown

Discuss SilverStripe Widgets.

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

Page: 1
Go to End
Author Topic: 423 Views
  • Chipie
    Avatar
    Community Member
    16 Posts

    Login wdget not shown Link to this post

    Hi all, I am new to silverstripe and have been trying to install the login widget using the widget installation tutorial.
    So far i can see my sidebar, I have a widget tab in the cms, I can drag the widget over to the right column and refresh and I have succesfully ran dev/build but cannot see the actual widget.

    I have added code to the following files:
    Page.php
    class Page extends SiteTree {

       public static $db = array(
       );

       public static $has_one = array(
       "SideBar" => "WidgetArea",
    );

    function getCMSFields() {
    $fields = parent::getCMSFields();
    $fields->addFieldToTab("Root.Content.Widgets", new WidgetAreaEditor("SideBar"));
    return $fields;
    }

    Page.ss

    h2>$Title</h2>
       
          $Content
          $Form
    <div id="sidebar">
    $SideBar
    </div>

    When i view the page source my div is shown but its empty.

    Has anyone had the same problem?

    Thanks

    Chipie

    423 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.