Blog

I’m having trouble getting the widget sidebar to work with the blog module on silverstripe 3.7

“silverstripe/cms”: “3.7.3@stable”,
“silverstripe/framework”: “3.7.3@stable”,
“silverstripe/widgets”: “@stable”,
“silverstripe/blog”: “2.5”,

whenever I add a widget to my main toplevel blog page type I get a blank page warning that the page is redirecting.

there is a readme in Widgets but it does tie up with what it’s talking about in the blog module version


class Page extends SiteTree
{
    private static $db = array(
    );

    private static $has_one = array(
      		"MyWidgets" => "WidgetArea",
    );

    function getCMSFields() {
      $fields = parent::getCMSFields();
      //widgets
      $fields->addFieldToTab("Root.Widgets", new WidgetAreaEditor("MyWidgets"));
      	return $fields;

    }




}

any thoughts appreciated

sorry ignore me.

I had tried to add some widget template code to my theme blog.ss template. BlogArchiveWidget bit removed.

Stopped the Redirect … hopefully thats all it was… you’d think that kinda thing it would show in my error log.

<% if WidgetCheck %>
	<div id="Sidebar" class="typography">
	<!-- Widgets -->
$MyWidgets
</div>
<% end_if %>

<!-- BlogArchiveWidget   -->
<% if $Archive %>
	<ul>
		<% loop $Archive %>
			<li>
				<a href="$Link" title="$Title">
					<span class="arrow">&rarr;</span>
					<span class="text">$Title</span>
				</a>
			</li>
		<% end_loop %>
	</ul>
<% end_if %>
<!--END  BlogArchiveWidget -->