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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Widgets /

Discuss SilverStripe Widgets.

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

Login wdget not shown


Go to End


1594 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