Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rich Green 2246 posts 4008 karma points
    Apr 14, 2011 @ 13:04
    Rich Green
    0

    Disable Create on Content Node

    As the 'Content' node doesn't get rendered by AfterNodeRender (as far as I can tell) how can I disable the 'Create' and 'Sort' options.

    I need to do this via the API, rather than the users section.

    Many thanks

    Rich

  • Rich Green 2246 posts 4008 karma points
    Apr 18, 2011 @ 15:46
    Rich Green
    0

    Surely there must be a way of doing this? :)

    Rich

  • Fergus Davidson 309 posts 588 karma points
    Apr 18, 2011 @ 17:20
    Fergus Davidson
    0

    hey rich.

    i haven't tried this myself, but saw it the other day:

     

    http://our.umbraco.org/projects/backoffice-extensions/attackmonkey-custom-menus

  • Rich Green 2246 posts 4008 karma points
    Apr 18, 2011 @ 17:29
    Rich Green
    0

    Thanks Ferg,

    However this doesn't work on the Content node as this doesn't get rendered in the same way as normal nodes..

    Rich

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Apr 18, 2011 @ 21:21
    Richard Soeteman
    0

    Hi,

    You can also disable create on the user permissions. Right click on the node youi want to disable access and select permissions. By default, permissions are set per user. I made a package that you can use to set permissions per user group http://our.umbraco.org/projects/backoffice-extensions/usergroup-permissions

    Hope this helps you,

    Richard

  • Rich Green 2246 posts 4008 karma points
    Apr 18, 2011 @ 21:26
    Rich Green
    0

    Hi Richard,

    Many thanks, your package looks great, however I am looking to do this via the api, so I can switch it on/off via a config file.

    I can make it work for every other node, just not sure which event to hook into for the root content node?

    Rich

  • Rich Green 2246 posts 4008 karma points
    Apr 21, 2011 @ 13:14
    Rich Green
    0

    Time to dig through the source code :)

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Apr 21, 2011 @ 17:15
    Tim
    0

    Hi Rich,

    Sadly not. The base folders are created by the Tree class that builds the menu, and don't fire any of the events that the normal tree menus do (as far as I can tell from grubbing through the source). I tried to do this a while ago, and the only way I could get access to the folder to change it was to create a custom content tree that inherited from the normal one, but just overrode the base tree initial folder create method to remove the add menu for all bar Administrators. I swapped the tree in the DB and it worked great, until 4.6.x came out, and the new user permissions editor for mapping users to permissions in the tree has a hard coded reference to the default content tree and that broke with a custom tree, so I couldn't use that method any more.

    If you find a way of doing this without killing the user permissions control, let me know, as I'd love to get this working on some sites again!

    :)

Please Sign in or register to post replies

Write your reply to:

Draft