Copied to clipboard

Flag this post as spam?

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


  • Lennart Stoop 304 posts 842 karma points
    Jan 23, 2012 @ 11:45
    Lennart Stoop
    0

    Dashboard per document type

    Hi all,

    I would like to create multiple dashboards in the content tree, and I would like to show them when a specific document type is selected (instead of showing the document's properties). For example:

    - Website A

    --- Dashboard 1

    ----- Node a1

    ----- Node b1

    --- Dashboard 2

    ----- Node a2

    ----- Node b2

     

    Any ideas how this can be best accomplished in Umbraco v4.7.1.1 ?

     

    Grtz

    L

  • Lennart Stoop 304 posts 842 karma points
    Jan 24, 2012 @ 08:57
    Lennart Stoop
    0

    Any suggestions?

    Currently I can only think of 2 options: either create a regular dashboard which has a dropdown that allows the user to select a dashboard (for which I will have to check the user start node in the content tree to make sure he is allowed to see the dashboard) or by creating a datatype and have the data editor render a dashboard (which is kinda dirty, but if I hide the label it should work seamlessly)

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jan 24, 2012 @ 15:35
    Tim
    1

    Hiya,

    You can use my Custom menu package to do something like that. One of the things you can do is override the onlclick event for certain docTypes. Using that, you can get them to open specific asp.net pages instead of the edit page for the Dashboard node types.

    I've done similar where I show the standard content dashboard rather than the edit page for nodes that shouldn't really be editable, such as any settings type nodes that I have on my site.

    The config file that comes with it has some basic examples in it, I think that opening a diferent URL is one of them. If you get stuck, or need any pointers, give me a shout.

  • Lennart Stoop 304 posts 842 karma points
    Jan 24, 2012 @ 16:38
    Lennart Stoop
    0

    Thanks for your suggestion, Tim, I will give it a go.

    Just to be sure: will I be able to pass in the ID of the node to the asp.net page?

  • Lennart Stoop 304 posts 842 karma points
    Jan 27, 2012 @ 10:29
    Lennart Stoop
    0

    I really like the idea of showing the standard content dashboard, and passing in the node ID which allows me to preselect the associated dashboard. The dashboard nodes have some settings as well though, and I'm wondering how I would still be able to show the edit page.

    From what I have now it looks like the settings only need to be configured just once, so perhaps I could have the dashboard redirect in place for published documents only. If that's not an option I guess I could move the settings to a subnode though.

     

    Edit: Or, I could just create a dashboard subnode. I'll start with that and see where it leads ;-)

     

  • Lennart Stoop 304 posts 842 karma points
    Jan 27, 2012 @ 11:33
    Lennart Stoop
    0

    Not sure which Javascript to use in the clickAction attribute if I wish to pass in the ID of the selected node. I've tried this one:

     <add docTypeAlias="FBWallDashboard" nodeId="" clickAction="javascript:UmbClientMgr.contentFrame('plugins/fbpostmanager/FBWallDashboard.aspx?id=' + UmbClientMgr.mainTree().getActionNode().nodeId);" menuItems="refreshNode" />

    But I guess the action node is only set when an action is selected from the context menu (I'm getting -1).

    And it looks like the default onclick event for nodes are generated server-side: openContent('');

    Any ideas?

     

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jan 27, 2012 @ 12:16
    Tim
    1

    If you can hold on till the weekend, I'll make a quick change to the code so that you can put placeholders in the URL string to replace tokens with things like the node id etc? Should be able to get that done by Saturday evening/Sunday morning if that's OK?

  • Lennart Stoop 304 posts 842 karma points
    Jan 27, 2012 @ 12:37
    Lennart Stoop
    0

    I actually got it working with following JS:

    <add docTypeAlias="FBWallDashboard" nodeId="" clickAction="javascript:UmbClientMgr.contentFrame('plugins/fbpostmanager/FBWallDashboard.aspx?id=' + $(this._tree.selected[0]).attr('id'));" menuItems="refreshNode" />

    But seems a bit fragile, so if you could provide placeholders that would be awesome (no rush though).

    Now to vote up your package, it works great and looks like I'm on the right track now, big thanks!

     

Please Sign in or register to post replies

Write your reply to:

Draft