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

Forums / Developing with Sitefinity / Hiding the forum's status field using the admin tool?

Hiding the forum's status field using the admin tool?

3 posts, 0 answered
  1. Engwar
    Engwar avatar
    7 posts
    Registered:
    08 Oct 2007
    21 May 2008
    Link to this post
    Is this possible to do or do I need to make code changes to hide this field?

    Thanks.
  2. Engwar
    Engwar avatar
    7 posts
    Registered:
    08 Oct 2007
    21 May 2008
    Link to this post
    In addition I want to hide the 'status' field for threads within a forum as well.
  3. Slavo
    Slavo avatar
    295 posts
    Registered:
    24 Sep 2012
    22 May 2008
    Link to this post
    Hello Engwar,

    What you want to do is easily achieved by modifying the templates for the respective views in the administrative part. After all, this is why we included those templates in the first place. After you remove the column, however, you have to apply a simple CSS rule to keep the look of the forums list. This is what you have to do:

    1. Open /<your_project>/Sitefinity/Admin/ControlTemplates/Forums/ControlPanelAllForumsTemplate.ascx
    2. On line 33 add the following attribute to the BoundField: HeaderStyle-CssClass="statusHead"
    3. Do the same for line 83 for the other BoundField.
    4. Open /<your_project>/Sitefinity/Admin/ControlTemplates/Forums/ControlPanelAllThreadsTemplate.ascx
    5. Add the same attribute (HeaderStyle-CssClass="statusHead") to the TemplateField on line 27.
    6. Open /<your_project>/Sitefinity/Admin/Themes/Default/Modules.css
    7. Add the following css rule at the end:
    .Forums td.visible,   
    .Forums th.statusHead,   
    .Forums td.hidden,   
    .Forums td.locked { displaynone; } 

    This is all you have to do - then the status field will be removed from the administration section of the forums module. If you want to do that for the public controls, the changes are analogous - you just have to use the templates for the public controls.

    Best wishes,
    Slavo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
3 posts, 0 answered