tags:

views:

1087

answers:

2

I'd like to add my own section to the umbraco dashboard so that I can integrate my own admin piece to the existing login/admin structure. Is this possible without editing and recompiling the umbraco source itself? Is it recommended? If so, does anyone have resources to get started doing this?

+8  A: 

Yes this is possible.

The backend can be extended both in terms of the dashoard, sections and content trees.

There is a config file you can use to define new dashboard sections.

The config file can be found in the following folder: "/config/dashboard.config"

Normally the dashboard.config file has some example XML of how it needs to be structured which looks something like this (I've extended it a bit to show more of the features).

<dashBoard>
    <section>
        <areas>
         <area>default</area>
         <area>content</area>
            <area>member</area>
        </areas>

        <tab caption="Last Edits">
         <control>/usercontrols/dashboard/latestEdits.ascx</control>
        </tab>
        <tab caption="Latest Items">
         <control>/usercontrols/dashboard/newestItems.ascx</control>
        </tab>
        <tab caption="Create blog post">
         <control>/usercontrols/umbracoBlog/dashboardBlogPostCreate.ascx</control>
        </tab>
    </section>
    <section>
        <areas>
         <area>media</area>
        </areas>

        <tab caption="Last Edits">
         <control>/usercontrols/dashboard/latestEdits.ascx</control>
        </tab>
    </section>
</dashBoard>

The section node allows you to set up different tab groups for different admin sections. In the example above the tabs Latest Edits, Latest Items and Create blog post will be applied to the default, member and content sections. Defaut is the first thing the user sees when logging into the back end before selecting a section.

To control what is seen in the different sections, you set up a new section node and define which area it applies to and the tab to show. In the example above the second section applies only to the media section.

What is displayed in the tab is a normal .NET user control. This can be totally separate from Umbraco or can contain umbraco specific code, depending on wether you are integrating a legacy application or simply extending umbraco.

If you wish to create a new section (one of the icons that appears in the bottom left corner of the umbraco backend) then you will need to get your hands a little dirtier.

To add a section you need to add a couple of database entries. First you need to define the app in the umbracoApp table.

Then add an entry to umbracoUsers2App for the admin user (0).

You'll then need to define a new content tree and create the supporting user controls.

There is more information about setting this up here: http://simm.dk/umbraco-corner/articles/making-custom-sections-and-trees-inside-umbraco---part-i.aspx

The first approach (just defining some new tabs) is considerably easier than adding a new section, so I'd recommend you start with that. Then when you are more comfortable you can dive right in and create whole new sections and content trees!

Tim Saunders
Thanks a lot. Your answer was very thorough. One note I would add: the "Members" section is actually named just "member" if you add it as an area. That was tripping me up when I tried this before.
Soldarnal
OK, I've added member to the example XML so people stumbling across this will hopefully avoid the pitfall!
Tim Saunders
A: 

The link given above has now expired - if anyone's after a screenshotted view of the process, check out http://www.geckonewmedia.com/blog/2009/8/3/how-to-create-a-custom-section-in-umbraco-4

And the last comment is certainly correct - it's a lot easier to add tabs than adding a new section...

Overflew