Controls: Render only on the Post

Topics: Controls
Jun 20, 2008 at 5:37 AM
Hello, I'm writing a custom BE.N control for my website. It's a control that appears in the PostView template, but I only want it to appear on the blog post... not in every post stub on the front page.

I don't know if that's clear enough. Basically, I want the control I'm writing only to appear when the visitor has clicked a post title (so they are looking one one specific post).

What check do I need to do to make that happen?

TIA!
Jun 20, 2008 at 6:08 AM
Try to perform checking on PostViewBase.ServingLocation == ServingLocation.SinglePost.

Regards,
Agus Suhanto
Jun 20, 2008 at 8:54 AM


suhanto wrote:
Try to perform checking on PostViewBase.ServingLocation == ServingLocation.SinglePost.

Regards,
Agus Suhanto

Thanks, I also found I can add the control to the post.aspx page (but I'll probably run into problems when upgrading to newer versions of BE.N). I'll rework my control to run the check you mentioned. Thanks!