Copied to clipboard

Flag this post as spam?

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


  • Vinod 22 posts 83 karma points
    Jan 23, 2015 @ 10:09
    Vinod
    0

    Display my Custom MVC Page in Custom Section in Umbraco 7.2.1

    Hi,

    I am using Umbraco 7.2.1 version and trying to create a custom section and the custom section should display an Employee Listing Page which is created in MVC. I added below code in Global.ascx and inserted "EmployeeList" in umbracoUser2app table and I got the section available in Umbraco.

       public class CreateContent : ApplicationEventHandler
            {
                protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
                {
                      var sectionService = applicationContext.Services.SectionService;
                sectionService.MakeNew("EmployeeList", "EmployeeList", "awesome-icon", 10);
                }
            }

    But how to display my Employee Listing page when I click on Employee Tab (I want something like below image when My custom tab is clicked.).

    But as of now, when I click on EmployeeList tab I get a blank page. How do I map Employee Tab and my page. Is there any way I could do that

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jan 27, 2015 @ 06:58
    Dennis Aaen
    101

    Hi Vinod, 

    There are some good blog post about how to create a new section a good starting point could be the blog posts from Markus Johansson http://www.enkelmedia.se/blogg/2013/11/22/creating-custom-sections-in-umbraco-7-part-1.aspx

    http://www.enkelmedia.se/blogg/2013/11/22/custom-sections-in-umbraco-7-%E2%80%93-part-2-the-views.aspx

    And you can find more about sections and trees in the official Umbraco documentation here http://our.umbraco.org/documentation/Extending-Umbraco/Section-Trees/ and Tim Geysens have made a nice walkthrough blogpost on his blog http://www.nibble.be/?p=440

    You might also be interested in the AngularJS Workbook https://github.com/umbraco/AngularWorkbook since chapter 5 describes how to add a custom tree to the "Settings" section and some code examples are on GitHub.

    Hope this helps,

    /Dennis

  • Vinod 22 posts 83 karma points
    Feb 16, 2015 @ 07:45
    Vinod
    0

    Hi,

    Ok thank you Dennis. I more quick question actually is it possible to have a custom section without tree structure.  

    I have a MVC page that I want to show in a custom section in Umbraco 7. I want to do this without having any tree within that section, as everything is already handled within the MVC page - It is being placed into the Umbraco back end for convenient access.

    I would like to have like when the user clicks into the section, that MVC Page has to be shown.

       
  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 16, 2015 @ 08:15
    Dennis Aaen
    0

    Hi Vinod,

    I donĀ“t think it possible for you to a have custom section without tree structure. But what I think you can do is to make the tree structure into a list view. Try to see this blog post about the list view http://www.robertgray.net.au/posts/a-first-look-at-umbraco-container-content-types#.VOGYZS5G_Ik

    Hope this helps,

    /Dennis

  • Vinod 22 posts 83 karma points
    Feb 16, 2015 @ 08:53
    Vinod
    0

    Got an solution like this not sure how far it works but trying. The default view for a custom section in Umbraco 7 by adding a new section element to Dashboard.config as follows:

     <section alias="StartupCustomDashboardSection"> <areas> <area>custom</area> </areas> <tab caption="Get Started"> <control>/app_plugins/custom/defaultview.html</control> </tab> </section> 

    where the <area> element must contain the alias of your custom section, all in lower case.

    The <control> element contains the path of the default html file.

    And also if its an MVC Page, how will it work. Doing an analysis.

     

     

  • Tom 713 posts 954 karma points
    Oct 23, 2015 @ 00:30
    Tom
    0

    Hi I was just wondering if you ever got this working vinod?

    I was looking at doing something similar and just displaying a list of items from the db in a grid on the right hand side. of the custom section's dashboard..

Please Sign in or register to post replies

Write your reply to:

Draft