This project is read-only.

"Normal" editable content and Blog one same Page

Topics: ASP.NET 2.0, Business Logic Layer, Controls
Jan 11, 2009 at 5:14 PM

Is there e way of putting normal editable (with tyni-mce-editor) content on a page and below a blog?
I'd like to make a welcome-page with the usual welcome-text followed by my "latest entries" (blogs).

Thank you
Jan 11, 2009 at 5:33 PM
Here's a previous thread that may be of interest.

The thread mentions the SinglePost user control created by dscoduc.  If you used this user control, you could create an Unpublished post which will be the content you want to show on your welcome page above your latest blog entries.  If the post is unpublished, then it won't show up in your normal list of blog entries.  Then you can add the SinglePost user control to your welcome page.  You can specify the Post ID of the unpublished post for the SinglePost user control to display.  The only change I think would be required in the SinglePost user control would be to tell it to display your post regardless of it being unpublished.  The following code in the SinglePost.ascx file can be removed to accomplish that.

// Check if post is published - if not only display it for an authenticated user
if (!singlePost.IsPublished && !Page.User.Identity.IsAuthenticated)
   singlePost = null;

This is of course just one way to accomplish what you're trying to do, but shouldn't be too difficult to get going.
Jan 19, 2009 at 9:34 PM
Thank you, it worked fine.