Copied to clipboard

Flag this post as spam?

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


  • Hawthorn 10 posts 122 karma points
    Mar 30, 2018 @ 20:30
    Hawthorn
    0

    Add button to admin document types

    Hi there

    I need to see if this is possible. We have a site with a certain document type which needs an extra button along with save. The client wants to save a page and then, separately, export it as XML.

    I cannot offer any code that has been tried or anything as at this stage I am just trying to se if it is even possible and how would you go about it?

    Thanks for any pointers

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    Mar 30, 2018 @ 21:11
    Søren Gregersen
    1

    it is possible to add a custom action to the context menu : https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/78088-add-custom-action-in-content-edit-page

    It seems a bit harder to inject a button. Haven't seen a (nice) example of that being done.

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Mar 31, 2018 @ 06:38
    Michaël Vanbrabandt
    0

    Hi,

    I have a plugin called MemberLogin which does this kind of task. It creates a custom action, renders a html page with some content and a button which executes some code.

    You can find the source code on github: https://github.com/Mivaweb/MemberLogin/tree/master/src/MemberLogin

    In the root folder you will find a file called Bootstrapper.cs which adds the custom action.

    Hope this helps.

    /Michaël

  • Hawthorn 10 posts 122 karma points
    Mar 30, 2018 @ 22:35
    Hawthorn
    0

    Ooh that seems like an option. I had never even considered the Actions but I don't really see why it couldnt work.

    I just want to avoid having them have to go to a custom area and doing it there, it really would be best to have out all on the one screen.

    I'm away without laptop at the moment but when I'm back in the office I'll check it out. Thanks!!

  • Rune Hem Strand 147 posts 911 karma points hq c-trib
    Mar 30, 2018 @ 22:41
    Rune Hem Strand
    101

    Another "easy" option would be to create a custom property editor that has the export button + functionality. That way you can place it on eg. an "Export" tab and wrap the UI anyway you like :)

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    Apr 11, 2018 @ 12:26
    Søren Gregersen
    0

    Hey mister hacker,

    That would give a "button"-property on the pages. Is there anyway to avoid that?

  • Nikhil Manwar 1 post 71 karma points
    Aug 31, 2020 @ 12:26
    Nikhil Manwar
    0

    Can you specify steps?

  • Hawthorn 10 posts 122 karma points
    Mar 31, 2018 @ 09:20
    Hawthorn
    0

    Thanks to both of you. I will have to look at both options.

  • Hawthorn 10 posts 122 karma points
    Apr 11, 2018 @ 10:14
    Hawthorn
    2

    I am marking Rune's answer as the solution only because it was easier for me to implement in a very quick test (only doing a spec for a job at this stage, so just needed to make sure it was possible). In the end, we might do it as an Action but for now Thanks to all who offered ideas.

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Apr 11, 2018 @ 10:18
    Michaël Vanbrabandt
    0

    Hi Hawthorn,

    thanks for sharing it on the community!

    Have a nice day.

    /Michaël

Please Sign in or register to post replies

Write your reply to:

Draft