This project is read-only.

Help getting started

Topics: ASP.NET 2.0, Themes
May 21, 2012 at 1:01 AM


I am completely new to blogengine, so apologies if this is a silly query.

I have been asked to convert about 1/2 an existing site to a blog style site.

The front page will have 3 different repeaters with the 3 or 4 latest items in the appropriate category.
So it will display the 3 latest deals in one area of the screen, the 3 latest competitions in another and the 3 latest news items in a nother.  All the facebook and twitter guff will be in a rhs column.

Users will click on say the deals header and be redirected to another page containing all of the deals.

They can then click on a given deal and be directed to that deals details page where they may enter a response.
The individual deal page may also be reached by clicking on 1 of the 3 deal items in the home page.

The structure will be the same for the other categories.

My question is - is this possible using blogengine?

From what I have read I cannot see how to build the 2nd teir pages ( eg repeater containing all deals).  All the examples I have seen have a home page displaying lists of various items. When an item is clicked the user is directed to a page displaying the items full details where a response may be made.

If it is possible, could someone direct me to somewhere I can learn how to do this?

Thanks in advance.








May 21, 2012 at 10:31 AM

There's a couple of things you can do which I think may be what you are after.

#1 - you can create a new physical ASPX page that inherits from BlogEngine.Core.Web.Controls.BlogBasePage.  Take a look at archive.aspx and archive.aspx.cs as an example.  Any ASPX page that inherits from BlogEngine.Core.Web.Controls.BlogBasePage will automatically have the theme applied to it.  You can then put any normal ASPX, HTML, etc on that new page you create.  i.e. you have full control over the page.

#2 - you could create "Pages" in the BE control panel.  An example page is here.  When you create the page in the control panel, when you are in the WYSIWYG editor, you can use special [usercontrol] syntax which will dynamically load and inject a pre-created ASCX User Control into the page.  The syntax looks like:

[usercontrol: ~/User Controls/yourcontrol.ascx]

You can also pass parameters into the user control like this:

[usercontrol: ~/User Controls/yourcontrol.ascx Property1=Some Value; AnotherProperty=Another Value]

.... and/or you could have logic contained within the ASCX user control to behave differently based on the actual page URL.

May 21, 2012 at 1:25 PM


Sorry to pop in on the Getting Started discussion, but how long has the [usercontrol] been around?  I've never seen it before.  Very cool!



May 21, 2012 at 2:56 PM

Hi Dave.  Yeah, it is pretty cool, and probably under-utilized.  The [usercontrol] syntax I believe can also be used in blog posts too.

According to the link below, it looks like this syntax may have debuted in BE 1.2. 

May 22, 2012 at 12:49 AM

Thanks Ben,
I did figure out the custom aspx page after posting the query.

The usercontrol with parameters looks like it will be useful for me as my lists need to be filtered by various parameters (region, category etc).  So using a combination of custom pages and usercontrols that accept parameters, I think I might be able to do what I need.




May 22, 2012 at 3:02 AM

Thanks for effecting the discovering of the [Usercontrol], Niall.  Good luck with your site!

Ben, thank you for following up and providing the background on the control.  1.2!  lol!  BE.NET always was ahead of its time... :)

Jul 5, 2012 at 10:46 AM

my question has to do with the, "user control"…

I noticed we can affect the raw HTML in the Control Panel while we are editing or creating a post…

I'm really new to blog engine…

I took a look at Mads video on creating a custom user control, very nice…

What I would like to do is create a custom user control, putting Google AdSense into this custom control and then having it "Float in the upper right-hand corner of every post"…


Can somebody give me some good direction?

Thank you in advance