Copied to clipboard

Flag this post as spam?

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


  • Ferdy Hoefakker 214 posts 248 karma points
    Feb 22, 2011 @ 15:14
    Ferdy Hoefakker
    0

    automatically open dashboard on section load

    Not sure if the term dashboard is correct, but it's the big block on the right of the backend UI. Anyway, I succesfully made a section and everything. But, the thing is, this section has no tree (by design). So, right now, clicking the root node will open the dashboard.

    However, I would like it to open, the moment the section is opened. It makes little sense to first have to go and click the one, single item in the tree.

    I have googled and searched, but didn't find an answer yet :(

    -Ferdy

    PS: Using Umbraco 4.5.2

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 22, 2011 @ 15:43
    Lee Kelleher
    0

    Hi Ferdy,

    One way would be to create a dashboard control for your custom section which will do a redirect to the page you want to load, (e.g. same action as clicking the root node).

    Cheers, Lee.

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Feb 22, 2011 @ 15:46
    Stefan Kip
    0

    Weird thing is, in earlier version umbraco opened the 'root node associated page' automatically (or the last opened page).
    Why is this behavior gone?

  • Ferdy Hoefakker 214 posts 248 karma points
    Feb 22, 2011 @ 16:34
    Ferdy Hoefakker
    0

    Lee, how do I add one of these? I found a link to a tutorial earlier during my searches, but it was broken. I did find the dashboard.config, but was unable to find documentation concerning it.

    -Ferdy

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 22, 2011 @ 19:49
    Lee Kelleher
    0

    Hi Ferdy,

    Here's a quick step-by-step...

    Firstly you'll need to register the dashboard control in the "/config/Dashboard.config" file:

    <?xml version="1.0" encoding="utf-8"?>
    <dashBoard>
        <section>
            <areas>
                <area>custom</area>
            </areas>
            <tab caption="Custom Section">
                <control>/usercontrols/redirect.ascx</control>
            </tab>
        </section>
    </dashBoard>

    Modify the "area" (the alias of your custom section).

    Then create a user-control (ASCX file) in the "/usercontrols" folder called "redirect.ascx" (you can call this whatever, be sure to modify the Dashboard.config too).

    Add the following code:

    <%@ Control Language="C#" %>
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Redirect("~/path/to/custom/section/start/page.aspx", true);
        }
    </script>

    Modify the path to wherever your custom section page is.

    Any questions, let me know.

    Cheers, Lee.

  • Ferdy Hoefakker 214 posts 248 karma points
    Feb 23, 2011 @ 09:44
    Ferdy Hoefakker
    0

    Thanks a lot Lee! That helped me a great deal, there is either one small mistake in your explanation, or I understood it wrong. You say to modify the area part with the alias of my custom section. So I looked up the appAlias. This however does not work, you need to use the appName. After figuring that out, it worked liked a charm!

    -Ferdy

    PS: How can I set up Umbraco to use my new section as the default section to open when logging in? It opens content by default, even if my section has a lower order number in the app table.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 23, 2011 @ 14:21
    Lee Kelleher
    0

    Not sure about how to set the default start section.  If a back-office user has access to the Content section, then that would load first - to my knowledge.

  • Ferdy Hoefakker 214 posts 248 karma points
    Feb 23, 2011 @ 14:29
    Ferdy Hoefakker
    0

    Yes, it does. But I don't want that, nor do I want to remove their acces to the content section. Or well, the client doesn't want it. I just have to find a way to make it work :P

    -Ferdy

Please Sign in or register to post replies

Write your reply to:

Draft