Displaying posts on non-BlogEngine Pages

May 4, 2009 at 10:02 PM
Edited May 4, 2009 at 10:03 PM
I tried looking but couldn't find the answer, so hopefully not to silly or repetative of a question.

Is there a bit of code that I can drop on to a page that will display the last "x number" of posts. Title, Date, and all post content.

Also looking for another version of the same thing that would display the title up to "x number of charachters" and pasrt of the post up to " x number of characters"

Do such beasts exist?

*** note the page I want to display on is within the same domain, but just not a blogengine page****

Andreas
May 10, 2009 at 8:53 PM

Yes, I would also like to know more on this.

 

I have a website abc.com and i have be.net installed on a subdomain. Both run on the same db. is it possible to display latest 10 blogs on the home page of my main page?

 

Regards,

chris

May 27, 2009 at 1:07 AM

Can anyone help with this?

Coordinator
May 27, 2009 at 8:23 AM

You can add the PostList user control to your page -- like the default.aspx page does.  In your codebehind, you can pass the posts you wish the PostList control to display.  The default.aspx.cs file already does essentially the same thing.

But the typical BE page also includes the style.css file and blog.js file.  You'll want to include <link> and <script> tags to these two files on your own page.  There could be some other things that need to be included, but these are the two items that come to mind now.

It's hard to say how the formatting of the posts will look when you do this.  If the style.css file is included, they'll probably be okay.

May 28, 2009 at 3:41 AM

Why not use an RSS feed?  You could use the RSS Toolkit ... http://www.codeplex.com/ASPNETRSSToolkit.  And databind it against a repeater or other grid control.  This would allow you to publish on another page on your site.  Or across domains.  Not sure if you can customize feeds within BE, like by category, or tags.  But that is a start.

 

May 28, 2009 at 6:45 PM

Hi,

I also have the same issue, trying to display the posts in a non BE page. My existing application has a base page of its own which all the other pages inherit from and blogengine has a base page of its own which BE pages inherit from. So now if i have to include the PostList control in a non BE page, I got to inherit that page from BE base page else i would be getting a class cast exception. But i do not want to do this as I have a base page of my own.  The RSS feed idea looks interesting , i have to look into that.

Can you tell if there is any work around for this?

Jun 3, 2009 at 4:26 PM
Hi, I haven't figured it out yet either. I think I am going to look into some type of feed reader.

Andreas


From: "ds1162" <notifications@codeplex.com>
Sent: Thursday, May 28, 2009 1:46 PM
To: andreas@metalpressions.com
Subject: Re: Displaying posts on non-BlogEngine Pages [blogengine:55284]

From: ds1162

Hi,

I also have the same issue, trying to display the posts in a non BE page. My existing application has a base page of its own which all the other pages inherit from and blogengine has a base page of its own which BE pages inherit from. So now if i have to include the PostList control in a non BE page, I got to inherit that page from BE base page else i would be getting a class cast exception. But i do not want to do this as I have a base page of my own. The RSS feed idea looks interesting , i have to look into that.

Can you tell if there is any work around for this?


Jun 3, 2009 at 11:21 PM

Hi,

If you want you can read the rss genrated by blogengine and display it the way you want through xsl , just create a user control and insert it in any aspx page. find more about xsl here : http://www.dnncreative.com/RSSNewsFeedXSLStylesheet/tabid/162/Default.aspx

Jun 5, 2009 at 3:13 AM
Edited Jul 15, 2009 at 9:50 AM

@metalpressions

Hi,
I needed to create a mix of stuff for a font page in BE and only a slim piece of the page was to feature summary blog posts (in my case only 4 post summaries)

With a little searching around I decided the best route was RSS Toolkit mentioned above.... I set about creating a blank mini page just to try out the RSS bit.

After ensuring the basic RSS worked with full post render I set about a couple of Truncation functions in the code behind page and it came together nice with a shortened date and controllable word count for RSS description content summary, even with advance CssClass and encapsulated within a nice looking RSS image panel...

IF you want the code snips in a zip file, PM me as Im happy to help out..

Cheers,

TheDon Sansone.