+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Filter categories in new/edit blog post

Filter categories in new/edit blog post

3 posts, 1 answered
  1. Gary
    Gary avatar
    91 posts
    Registered:
    19 Jul 2007
    19 Apr 2011
    Link to this post
    I am implementing customizations so that categories are blog-specific. This approach uses the category hierarchy in which the first level corresponds to the blog owner and the second level are the categories for that blog. I have addressed the customization for presenting the blog categories to the end-user, but I'm struggling with the customization within the new / edit blog post screen.

    My approach has been to create custom templates for PostNew.ascx and PostEdit.ascx, and modify the markup to reference my custom version of the ContentCategoryField web control. Within this control, InitializeControls handles the logic for fetching the customized list of categories for binding to CategoriesList.

    My difficulty is with identifying the blog that is being used from within the custom ContentCategoryField control. There is a "BlogID" in this.Manager.MetaKeys but its value is empty.

    Can you help me identify the active blog from within the ContentCategoryField control? Or should I be taking a different approach to customize the set of categories populated on this screen?

    Thanks,
    Gary
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    19 Apr 2011
    Link to this post
    Hello Gary,

    There is a ParentId QueryString in the url that you can use the get the blog ID.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Answered
  3. Gary
    Gary avatar
    91 posts
    Registered:
    19 Jul 2007
    19 Apr 2011
    Link to this post
    Thank you, Ivan. That makes sense, and it did the trick. Much appreciated!
Register for webinar
3 posts, 1 answered