Copied to clipboard

Flag this post as spam?

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


  • Max 80 posts 437 karma points
    Dec 27, 2016 @ 13:50
    Max
    0

    Custom Section Dashboard

    I've created a couple custom sections with trees and they are working as intended. I want them to load a custom dashboard before a node record is edited or created and I cannot seem to get this right.

    I have the view created with an angular controller and it loads (in the content area) if I replace <area>jobs</area> with <area>content</area>

    The minute I try the following though I lose the tab, view and controller in my own section area. I suspect i'm not defining <area>jobs</area> or my application tree controller is missing something

    <section alias="JobsSection">  // application alias from .cs
        <areas>
          <area>jobs</area> // application name from .cs
        </areas>
        <tab caption="Current Postings">
          <control>/app_plugins/JobsSection/backoffice/dashboards/default.html</control>
        </tab>
      </section>
    

    My application .cs looks like this:

     [Application("JobsSection", "Jobs","icon-employee", 103)]
        public class JobsSection : IApplication
        {
    
        }
    

    My manifest looks like:

    {
      "javascript": [
        "~/App_Plugins/JobsSection/jobsResource.js",
        "~/App_Plugins/JobsSection/backoffice/jobs/editController.js",
        "~/App_Plugins/JobsSection/backoffice/dashboards/defaultController.js"
      ]
    }
    
  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Dec 28, 2016 @ 11:52
    Dave Woestenborghs
    101

    Hi Max,

    I think the area should match the alias of your custom section. So in your case that should be JobsSection.

    <section alias="JobsSection">  // application alias from .cs
        <areas>
          <area>JobsSection</area> // application name from .cs
        </areas>
        <tab caption="Current Postings">
          <control>/app_plugins/JobsSection/backoffice/dashboards/default.html</control>
        </tab>
      </section>
    

    Dave

  • mcgrph 35 posts 162 karma points
    Jun 24, 2017 @ 11:26
    mcgrph
    0

    A thousand thanks Dave! This fixed it for me :)

  • Max 80 posts 437 karma points
    Dec 28, 2016 @ 13:49
    Max
    0

    Dave,

    Thanks, that did it. It was case sensitive. Can you implore the folks with access to update the documentation. I'm thankful its working now...and I feel foolish for not trying that. I'm sure I tried "jobsection" not "JobSection" because the documentation states lower case...

    enter image description here

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Dec 28, 2016 @ 13:56
    Dave Woestenborghs
    0

    Hi Max,

    Glad you could solve your issue.

    The docs are open source by the way : https://github.com/umbraco/UmbracoDocs

    So you can fork the repository, change the docs and create a pull request for it.

    If the pull request get's approved the docs will be updated.

    The page you need to change is this one : https://github.com/umbraco/UmbracoDocs/blob/master/Extending/Dashboards/index.md

    Dave

  • Max 80 posts 437 karma points
    Dec 28, 2016 @ 14:00
    Max
    0

    That's great Dave.

    I'll put it through in the near future! ... I need to make up some lost development time first ;-)

    Max

  • Tanner Danzey 1 post 71 karma points
    Feb 23, 2017 @ 21:55
    Tanner Danzey
    0

    Just a note to anyone who is also having this problem, I just spent an inordinate amount of time stumbling over myself trying to get this to work because I followed the documentation and thought it had to be lowercase. I had the EXACT same problem as Max and tried the solution posted by Dave but it still didn't work, so here's how it actually works for all who may encounter this problem in the future.

    My application definition is as follows:

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

    Now by Dave's post my definition in Dashboard.config seemed to have to be set as "TestSection", but that didn't work! Instead it is supposed to be Test. The following worked and allowed me to finally see something in the dashboard for my custom section:

    <section alias="TestSection">
            <areas>
                <area>
                    Test
                </area>
            </areas>
            <tab caption="Search">
                <control>
                    ~/App_Plugins/Test/backoffice/dashboard.html
                </control>
            </tab>
        </section>
    

    So, your your area name MUST be EXACTLY what you have as the application name that follows. Anything else and nothing will happen at all, no error, no display, much frustration! I'm adding this to the documentation as we speak.

Please Sign in or register to post replies

Write your reply to:

Draft