Post List / Default Post Page

Topics: Controls, Themes
Dec 25, 2012 at 1:24 PM

I am fairly new to BlogEngine.NET (BE) but so far it seems pretty decent.  I think the documentation is somewhat lacking, however, and there is one particular thing about creating a custom theme that has me stuck.

Just so there's no confusion below, by default web page, I mean the site's landing page, or "home" page -- the page that gets served up when the URL specifies just the domain name, like "http://www.dotnetblogengine.net/"

Out of the box, when the default web page is requested, BE calls your theme's PAGEVIEW.ASCX file in a loop to get the excerpt for each of the last "posts per page" posts, and then this information is inserted into the ASP:ContentPlaceHolder with the id of cphBody on your master page.

For an individual post or a page, BE grabs the matching and inserts it into the cphBody object.

However, if you create a page and select the option for "Is Front Page?" then when the default page is requested, BE will grab the content of the designated "front page" and use it instead.

My question is... once you've done that, how do you get the post list?  I've got the feeling it has something to do with adding a user control for the post list to my page, so I tried this:

[usercontrol: ~/User controls/PostList.ascx ]

When I add that to my page content, nothing is output.  I know it's loading the control OK because changing the name gives an error. Does it need parameters, or should I be doing something else altogether?

Help!

(Oh, and happy holidays too!)

Apr 23, 2014 at 3:49 PM
Did you ever found a solution for this?
Apr 24, 2014 at 12:00 AM
No, and I soon thereafter pretty much gave up on Blogengine.net, at least for the time being.

The code looks fine, but when you can't even find documentation for simple things like this, it's pretty obvious that doing anything beyond using a prebuilt template is going to require a huge time investment to wrap my brain around the source code. I don't have the time.

It's too bad... the code seems capable but without better documentation, it's never going to see wider adoption.
Apr 24, 2014 at 12:13 PM
Edited Apr 24, 2014 at 12:15 PM
Hi MikeFulton and Mfpgoose,

However, if you create a page and select the option for "Is Front Page?" then when the default page is requested, BE will grab the content of the designated "front page" and use it instead.

My question is... once you've done that, how do you get the post list?

Do you mean how to go to the post list since it is not the default page any more?

What exactly do you want from the post list?

Just a list of links for posts like the post list, or the actual post list?


The lack of documentation have always been a problem, but that is an issue of not enough resources or time to produce them.

But, even with lack of documentation we try to help when we can here in the forum, just did not see why this was not answered before through?

When you ask a question and it does not get answer some times you have to update it to bump it up the list so that people can see it.
Apr 24, 2014 at 1:35 PM
I have posted a discussion topic and an issue for this subject:
https://blogengine.codeplex.com/discussions/543026
https://blogengine.codeplex.com/workitem/12485

So basically I would like to have a default page (a "managed" page created through BE.NET content, by using the "is front page" setting) and below that content I would like the blogposts to show up, as you would have without a page being configured as "is front page".

I hope this makes sense.
Apr 24, 2014 at 1:38 PM
And I found out that you can add static content to the default.aspx page.
This is actually the result I'm looking for, but again that's static content. Utilizing an existing BE.NET page is what I'm looking for.

Thanks!
Apr 24, 2014 at 2:49 PM
Hi Mfpgoose,

Put it in your site.master page around line 45 in the header section.

That should do it.

If you have any other issues let us know.


Have a great day!

Brian Davis
Apr 25, 2014 at 7:24 PM
Just putting in


[usercontrol:~/User controls/PostList.ascx]


Worked for me

http://seo.bloggersonline.com


Screenshot showing it working:

http://awesomescreenshot.com/01d2po2328