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

Forums / General Discussions / Hide Page Groups option

Hide Page Groups option

6 posts, 0 answered
  1. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    24 Mar 2011
    Link to this post
    Hi,
    I have a group of users who have permission to create a page. But I just want them creating a new page but I do not want them creating a new "Page Groups".

    How can I hide a "Page Groups" option at a creating page panel?

    Can I hide a "Page Groups" option just for certain user group?


    Please help!


    Thanks,
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    30 Mar 2011
    Link to this post
    Hello NK,

    You have to modify the backend templates

    ~/Sitefinity/Admin/ControlTemplates/Pages/PagePropertiesInsert.ascx

    ~/Sitefinity/Admin/ControlTemplates/Pages/PagePropertiesEdit.ascx

    Inside the templates there is a RadioButtonList control with ID PageTypeOptions. You can access the control from the server and hide its list item based on the current user and its roles by using UserManager.GetRolesForUser(string username)

    Regards,
    Ivan Dimitrov
    the Telerik team
  3. Ryan
    Ryan avatar
    9 posts
    Registered:
    08 Oct 2007
    30 Mar 2011
    Link to this post
    Where are the Control Templates?  Can we download them somewhere?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    04 Apr 2011
    Link to this post
    Hello Ryan,

    PagePropertiesInsert and PagePropertiesEdit  are located under ~/Sitefinity/Admin/ControlTemplates/Pages/ as shown above. There are other templates - for the generic content based modules which are embedded

    http://www.sitefinity.com/support/kb/sitefinity-3-x/how-to-map-a-view-to-an-external-template-in-sitefinity-3-6-or-later.aspx

    All the best,
    Ivan Dimitrov
    the Telerik team

  5. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    06 Apr 2011
    Link to this post
    Ivan,
    Thank you for replying.

    I would like to control the user based on their roles on server, but I could not find any code behind of PaperPropertiesInsert.aspx.cs or Pages/PagePropertiesEdit.ascx.cs to work on  UserManager.GetRolesForUser(string username)


    Thanks,

  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    06 Apr 2011
    Link to this post
    Hi,

    These are just templates, but you can create a  code behind of them and add your logic there or you can write your code in <script> block inside the ascx

    Kind regards,
    Ivan Dimitrov
    the Telerik team

Register for webinar
6 posts, 0 answered