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.

Widgets /

Discuss SilverStripe Widgets.

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

Login wdget not shown


Reply


475 Views

Avatar
Chipie

Community Member, 16 Posts

21 November 2011 at 4:31am

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