Copied to clipboard

Flag this post as spam?

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


  • Topic author was deleted

    Apr 17, 2015 @ 19:24

    Custom IAction V7 route

    So I'm trying to implement a new IAction.

    The IAction gets registered no problem, but when it comes time for the context menu panel to slide out, it will only render what seems to be a non-changeable route.

    To be more clear, if I implement the IAction below, then select it in the menu; it expects there to be a template at:

    umbraco/views/nodeTypes/move.html

    Since that template is not there, I get a 404.  The easy solution is to create that view at that location.  However I want to point to a different location, say: /App_Plugins/someOtherPlace/move.html.

    I've tried adding the [PluginController("someOtherPlace")] to no avail.  Is this possible?

    public class ActionMoveDocumentType : IAction
    {
        private static readonly ActionMoveDocumentType InnerInstance = new ActionMoveDocumentType();
    
        public static ActionMoveDocumentType Instance
        {
            get { return InnerInstance; }
        }
    
        public string Alias
        {
            get { return "move"; }
        }
    
        public bool CanBePermissionAssigned
        {
            get { return false; }
        }
    
        public string Icon
        {
            get { return "enter"; }
        }
    
        public string JsFunctionName
        {
            get { return ""; }
        }
    
        public string JsSource
        {
            get { return ""; }
        }
    
        public char Letter
        {
            get { return 'ยจ'; }
        }
    
        public bool ShowInNotifier
        {
            get { return false; }
        }
    }

     

  • Comment author was deleted

    Apr 17, 2015 @ 20:41

    While it's not pretty, and I would like something more elegant...

    This will work if I add a rewrite to the urlrewriting.config

    <add name="document-type-mover"
      virtualUrl="^~/umbraco/views/nodeTypes/move.html"
      rewriteUrlParameter="ExcludeFromClientQueryString"
      destinationUrl="~/App_Plugins/DocumentTypeMover/views/move.html"
      ignoreCase="true" />

     

Please Sign in or register to post replies

Write your reply to:

Draft