Copied to clipboard

Flag this post as spam?

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


  • Christoffer Andersen 23 posts 53 karma points
    Jan 28, 2010 @ 13:56
    Christoffer Andersen
    0

    Removing the create and delete option in umbraco

    Greetings once again

     

    In umbraco if you create a new tree to be shown in a section, it's automaticly granted the follwoing option create, and it's content can be deleted. I however have a tree where I don't want to be able to create or delete anything from the umbraco back office. Anyone got an idea on how to dissable the create and delete options when right click the representitve of a tree and it's content.

     

    Thank you on advance

     

    Christoffer

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 28, 2010 @ 14:12
    Dirk De Grave
    1

    yup, it's quite simple... when you're adding the node to the tree on Render(), use

    node.Menu.Clear();

    which will remove the actions from the context menu.

    If you wish to add your own, use:

    node.Menu.Add(IAction action);

    or

    node.Menu.AddRange(List<IAction> actions);

    Cheers,

    /Dirk

  • Christoffer Andersen 23 posts 53 karma points
    Jan 28, 2010 @ 14:23
    Christoffer Andersen
    0

    Again thx Dirk, I knew there would have to be some simple way to do it, unfortunatly google weren't my friend in this case :)

Please Sign in or register to post replies

Write your reply to:

Draft