Latest post on front page

Topics: Controls, Themes
Oct 16, 2008 at 4:08 AM
Hi!

I am using BE.Net on my site http://www.geekays.net/ and have added a page into it and set it up as the front page. The front page now does not show the entries in the blog and I have put a link to blog.aspx page. It is working fine and I am happy. Now I wish to show the latest post from the blog entries on my front page.

Is there any way to achieve this?

Kangkan
http://www.geekays.net/
Oct 23, 2008 at 11:19 AM
Seems, there is no way of doing it.

I am still waiting for all of you. Please look at this or let me know if anybody has tried anything on it.

Kangkan
http://www.geekays.net/
Oct 23, 2008 at 2:45 PM
You would probably need to write a usercontrol that will display the first post from the post list...  Nothing too difficult.  If you want I could probably write something up...

Chris
Oct 28, 2008 at 11:09 AM
Thanks Chris.

Can you please help me a bit in this direction?

Regards,

Kangkan
http://www.geekays.net/

Oct 30, 2008 at 12:09 AM
I wrote the User Control today and I think it works pretty good.  Read more about it on my blog on my blog!.
Let’s suppose you want to use a separate home page for your BlogEngine.NET website.  Now let’s suppose you want to display the most recently published post on that page.  Up till now there wasn’t an easy way to do this without inheriting the BlogEngine Base Page and thus being under the site.master page reference.  Well now there is an easy way... [more]
Cheers!
Oct 30, 2008 at 4:34 AM
A good thought.

But I added my homepage within BlogEngine.NET (I added pages to the site from the control panel and set one of them as my home page). So is there any option in this scenario?

Regards,
Kangkan
http://www.geekays.net/
Oct 30, 2008 at 6:45 AM
Edited Oct 30, 2008 at 6:50 AM
You should be able to add the user control to the page and get the same results...  To add the control to your BlogEngine.NET page you use the following format:

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

And that should work just fine...
Oct 30, 2008 at 7:11 AM
I posted an example of how to use the User Control in a blog post (it would be the same with a Page).

Example of SinglePost User Control
Nov 14, 2008 at 7:56 AM
Oh thats interesting. Let me try and update you in couple of days.

Regards,

Kangkan
# +91-9810831272
Website: http://www.geekays.net/


Please do not print this email unless it is absolutely necessary. Spread environmental awareness.




On Thu, Oct 30, 2008 at 12:41 PM, dscoduc <notifications@codeplex.com> wrote:

From: dscoduc

I posted an example of how to use the User Control in a blog post (it would be the same with a Page).

Example of SinglePost User Control

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Nov 17, 2008 at 12:23 PM
Great!

Its working perfectly now. See my site http://www.geekays.net/
Nov 17, 2008 at 5:01 PM

Nice!  Glad it is useful to you.

Chris

From: Geekays [mailto:notifications@codeplex.com]
Sent: Monday, November 17, 2008 5:24 AM
To: chris@dscoduc.com
Subject: Re: Latest post on front page [blogengine:37840]

From: Geekays

Great!

Its working perfectly now. See my site http://www.geekays.net/

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com