Copied to clipboard

Flag this post as spam?

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


  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Apr 02, 2016 @ 13:00
    Michaël Vanbrabandt
    0

    Starting with extending the umbraco backoffice

    Hi,

    I am learning the way of extending umbraco's backoffice. In most of the tutorials they mentioned to create new classes but where do you place these classes? Just in the App_Code folder or do you create a ne folder just for the new section ( application ) or in a new project or ... ?

    For example you want to create a new section:

    [Application("CustomSection", "CustomSection","icon-car", 15)]
    public class CustomSectionApplication : IApplication {}
    

    Where do I place this code?

    Then for the new tree:

    [PluginController("CustomSection")]
    [Umbraco.Web.Trees.Tree("CustomSection", "CustomSectionTree", "My custom section", iconClosed: "icon-doc")]
    public class CustomSectionTreeController : TreeController
    {
    }
    

    Do I place this in the controllers folder or ... ?

    Thanks

    /Michael

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Apr 02, 2016 @ 13:32
    Michaël Vanbrabandt
    0

    Also I must be simple to create a package from it with all the js css files and a dll.

    That comes to my next question, how to create a dll only with the ApiControllers code and view models?

    /Michael

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 02, 2016 @ 15:42
    Jan Skovgaard
    0

    Hi Michaël

    What tutorials have you been following? I guess you should place the models, controllers etc. in your project where it makes sense to do so. If you're adding controllers then you can add them in your controllers folder and keep the models in your models folder etc.

    But you can also have a folder with the name of your section like "MySection" where you organize the controllers, models etc. in relevant folders as well.

    I think that perhaps you can follow along how David Brendel is doing here http://24days.in/umbraco/2015/custom-listview/ showing how to "re-use" the custom list view in your own section...it is the same steps that you will need to go through I suppose even though your aim and context is a bit different. But perhaps it can give you some insight - You can see he's project structure here https://github.com/Mantus667/ListViewForCustomSection

    You'll need to add the needed js and css using a package manifest and you'll also need to create your views and controllers (For the backoffice UI using anguarjs) in the /App_Plugins folder, which you can also see how David has done.

    I hope this helps a bit :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft