Umbraco Multi Site - How to set MultiMediaPickers Start node dynamically
Hi,
I am working on multisite using Umbraco and now I am stuck with one thing related to MediaPicker - Images.
Use Case:
Lets say I currently have following multisites in my Umbraco instance.
Site-1
Site-2
I am trying to eliminate following 2 scenarios
The users of each site should not have access to other folders than their root Media folder.
In the content region I have Nested Content Based structure which is using Media Pickers for Icons and Feature images etc... Lets say I am trying to access "Icon Media Picker" under "Site-1" then I should be able to see only the "Site-1" "Icon" folders images listed in the new dialog which generally opens for media picker and that has ability to upload image or select existing image. I also went through Hybrid Framework but wasn't able to achieve this scenario.
Could you guys please help me out to figure out a solution or give me a walkthrough for this scenario.
the config.startNodeId gets passed through to the dialog where you choose the images. So can you not go into the users section of umbraco select the user and set their start node for the media library.
Unless you explicitly set a start node when creating the datatype this node will be the initial entry point a user sees when wanting to add or upload media.
Now this probably isn't perfect for you as i know you want to modularize your media assets and relate them to pickers.
If you want to do everything and you really can't get the hybrid framework method to work and you are not using a dev version of umbraco which might allow you to use the method described by shannon here using the 'EditorModelEventManager.SendingContentModel' event
Then you might have to create your own variant of the mediapicker property editor. I imagine that pretty much all the functionality could be wrapped by extending your editor from this class but using your own view path for a view which can use a slightly modified version of the core media picker controller replacing or extending the lines mentioned at the start of my post to call your own service for the startNodeId.
If you have already invested time in the hybrid framework method it may still be worth looking at that again and post an example of which bit is failing and what the errors are.
Thanks Ian,
I will look into it once I get time. For the current project which I am working on is having tight deadline so will try this out once I get done with the project :).
I will surely drop my feedback once I implement start node thing.
Umbraco Multi Site - How to set MultiMediaPickers Start node dynamically
Hi,
I am working on multisite using Umbraco and now I am stuck with one thing related to MediaPicker - Images.
Use Case: Lets say I currently have following multisites in my Umbraco instance.
I am trying to eliminate following 2 scenarios
Could you guys please help me out to figure out a solution or give me a walkthrough for this scenario.
Thanks in Advance..
Hi this is part of the code for the mediapickercontroller
the config.startNodeId gets passed through to the dialog where you choose the images. So can you not go into the users section of umbraco select the user and set their start node for the media library.
Unless you explicitly set a start node when creating the datatype this node will be the initial entry point a user sees when wanting to add or upload media.
Now this probably isn't perfect for you as i know you want to modularize your media assets and relate them to pickers.
If you want to do everything and you really can't get the hybrid framework method to work and you are not using a dev version of umbraco which might allow you to use the method described by shannon here using the 'EditorModelEventManager.SendingContentModel' event
Then you might have to create your own variant of the mediapicker property editor. I imagine that pretty much all the functionality could be wrapped by extending your editor from this class but using your own view path for a view which can use a slightly modified version of the core media picker controller replacing or extending the lines mentioned at the start of my post to call your own service for the startNodeId.
If you have already invested time in the hybrid framework method it may still be worth looking at that again and post an example of which bit is failing and what the errors are.
I'm guessing you saw the forum post
Thanks Ian, I will look into it once I get time. For the current project which I am working on is having tight deadline so will try this out once I get done with the project :).
I will surely drop my feedback once I implement start node thing.
is working on a reply...