Copied to clipboard

Flag this post as spam?

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


  • Gregg Duncan 48 posts 70 karma points
    Jun 28, 2011 @ 00:05
    Gregg Duncan
    0

    Allowing multiple media folders

    We are working within a multi site setup. We have multiple similar sites that are all affiliated with the same national company. Each site has it's own media folder for their specific images. We would also like to have a "Shared" media folder where all sites could link to uploaded images. We would not allow uploading to this folder or any alteration of the images. But we'd like to make them available for the site admins to use on their site without having to put copies in each of their media folders. Is this possible?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jun 28, 2011 @ 00:11
    Dirk De Grave
    0

    Hi,

    that should be possible if you use this kind of structure:

    - Media

    -- Shared media

    --- Media for site 1

    --- Media for site 2

     

    using this setup, you can give admins access to shared media and underlying folders, whereas "site users" can only access media for site x (the start media node can be defined when browsing a user's details page in the backend.

    Asking why all site media folders go under shared media folder.? Because you can only choose a single start media node for each user. If you'd put Shared media and Media for site 1 at the same level, you wouldn't be able to allow site admins to see the complete media structure.

     

    Makes sense?

     

    Cheers,

    /Dirk 

     

  • Gregg Duncan 48 posts 70 karma points
    Jun 28, 2011 @ 00:20
    Gregg Duncan
    0

    Unfortunately that answers my question. By admin I meant a single site admin. In the set up you describe If I give a site admin access to the shared media then I'm also giving them access to all the sub folders which include the media for every other site. That I can't allow. I was hoping there was a way to give a single user permissions to multiple media folders so that we could put the shared media on the same level as the site media and give each site admin access to the shared media as well as their own site.

    I'm assuming that umbraco could be extended to perform this way if desired?

  • Chris Dunn 210 posts 401 karma points
    Jun 28, 2011 @ 00:47
    Chris Dunn
    0

    You can extend umbraco to customize the rendering of a tree and possibly hide certain node types (media types) using custom event handlers based on user properties (type, login, etc).

     

    BaseContentTree.BeforeNodeRender += new BaseTree.BeforeNodeRenderEventHandler(BeforeNodeRenderEventHandler);

     

        private void BeforeNodeRenderEventHandler (ref XmlTree sender, ref XmlTreeNode node, EventArgs e)
        {    
    //check node properties (type, id)
    //check user
    //don't show node
    node = null; }

    So you bypass the start media node problem and write your own handler to determine which media nodes are displayed.

    There are some good blog posts out there or umbraco.tv tutorials on custom trees if you need some help getting started.

    -Chris

     

Please Sign in or register to post replies

Write your reply to:

Draft