Editable Section

Jun 13, 2011 at 7:42 PM

I'm using BlogEngine.NET as the core CMS in  site, and I'd like to add a few editable sections around the site. Is there any way these could be managed through blogengine? Eg: I'd like to add several "regions" to the homepage which I'd like to appear somewhere in blogengine (perhaps as posts/pages?) so they could be edited.

Is this possible?

Jun 13, 2011 at 9:55 PM
Edited Oct 24, 2011 at 8:09 PM

Using the master page  code behind file you can add different widget zones and have it set up for curtain pages or posts to

have only a certain widget zone show up.

Can filter by  Posts,Pages, or Specific pages and posts.  Even categories if needed.

 

Like this:

 

 

    protected void Page_Load(object sender, EventArgs e)
    {
        var url = Request.Url.ToString();
        if (url.Contains("post.aspx"))
        {

           
            WidgetZone.Visible = false;

        }

        else

            
        WidgetZone.ZoneName = "be_WIDGET_ZONE";

        
        
        


        
}

Using the

 

if (url.Contains("post.aspx"))

Code you can basically have it set to any page or post you want.

The code above is just for example to get you started and where you can see how you can do it.

Java Blog

Jun 14, 2011 at 8:29 AM

Thanks. So could I create a page called "FAQ" for example, then set my WidgetZone.ZoneName to FAQ to display the page?

Jun 14, 2011 at 6:11 PM
Echilon wrote:

Thanks. So could I create a page called "FAQ" for example, then set my WidgetZone.ZoneName to FAQ to display the page?

 

What I said before is for editable Widgets.   Like Links,Cateories listing, and etc.   But, not for pages them self.

 

You can make a page "FAQ"  and have that page only display links and related items to the "FAQ" page in the widgetZone.

 

I am not 100% sure on what you wanted to do  can you explain or show an example website that would help :)

 

few editable sections around the site

What do you want to edit in these sections?

 

 

Jun 14, 2011 at 6:16 PM

I just want editable zones around the site, eg: In the sidebar or footer. I'd like these to be editable via BlogEngine.

Coordinator
Jun 14, 2011 at 7:00 PM

Take a look at this post, it shows how to add widget zone(s) to the theme.

Jun 14, 2011 at 7:05 PM
echilon wrote:

I just want editable zones around the site, eg: In the sidebar or footer. I'd like these to be editable via BlogEngine.

 

 

Widgets in the Widgetzone will do it :)

 

Jun 14, 2011 at 8:17 PM

So I'd have to create a different widget for each editable zone?

Jun 14, 2011 at 8:38 PM

No just have different  Widget zones.

 

Like  WidgetZoneFAQ  and WidgetZonePage

 

Data for the widgets are stored different for each zone.  So you can have two textboxes one and each and still have different data for each.

 

Data is stored based on Widget zones.  Not the widget it self.

Jun 14, 2011 at 9:00 PM

Nifty. Cheers.