Copied to clipboard

Flag this post as spam?

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


  • stc 72 posts 101 karma points
    May 12, 2010 @ 19:29
    stc
    0

    Media gallery implementation best practice...

    Hi guys,

      I'd like to add to each of my article documenttypes a media download section, so that effectively every single article item can have multiple media images/files associated to it...the drawback?...I'd like to make this as simple as possible for someone to create (preferably without having to use umbraco's backend)...

      So this is what I was thinking...I'll be creating the same directory-like structure automatically (via article publishing event handlers) in the media section as it will exist in the content tree...that way every media file/image which is in the same named tree structure as the article(s) will be associated to them (i'll be extracting current page tree structure data via xslt), thus not having the need to create/setup documenttype nodes in the content tree that will only be containing single (or multiple) upload datatypes and nothing else (which I think would be extremely hard to setup without having the umbraco backend to your disposal - there is no way to setup upload/media picker datatypes outside of backend - or am I wrong about that?).

      The way I described my users could use UmbracoClient tools to upload media to articles they would write in WLW (they will have to know article tree structure first though)...or could I just as easily (or easier) maybe setup some plugins for WLW (Word) that could assign my already uploaded media to some (multiple) media picker datatypes (thus circumventing the one potential problem I now see - the same media items having to be uploaded more times if referenced by more then one article)...I'm trying to find the best solution to easily setup (multilingual 1:1) articles with media items (but I now see problems in each implementation), do you have a best practice one, with least problems please? TIA

     

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    May 13, 2010 @ 13:21
    Sebastiaan Janssen
    1

    If your editors are going to be using Live Writer, then I'm not sure you can get away with this easily. The Live Writer integration only allows you to edit content of one single content type per user.

    Why can't they log into the Umbraco backend, it's not so difficult to learn right?

    Anyway, the upload datatype just contains a string of the path to the file you're refering to, so setting it up from outside of umbraco just requires you to do fill the property with that string.

    I'm not sure what the best solution is here, but I'm pretty sure that you can spend a lot of time building things if you decide to push forward on this one. :-)

    In the past, what I've done is having a look at what exactly the editors will be needing. Do they REALLY need to be able to upload unlimited files? Or will 5 files be enough per document? Maybe even 10, that's not so bad to create in a document type. 

  • stc 72 posts 101 karma points
    May 24, 2010 @ 16:27
    stc
    0

    Hi Sebastian,

      First off, thanks for your reply...it made me rethink the whole situation and now I think I've come up with a viable alternative...the Editors will still use WLW, however the process of adding related media items is probably gonna be included inside of the article creation process via custom WLW plugin / Publish Event Handler.

      This is the deal, I was thinking that after my editor writes an article, he or she could use a modified Thomas Hoehler's Insert Umbraco Link Windows Live Writter plugin to insert links (which I would modify so that the inserted anchor includes a custom class so I could distinguish the related media links). Afterwards, a custom beforePublish event handler could just clear those links and insert them one-by-one into the Ultimate Picker property which would belong to my article being published. That way, I could just write a template for the articles that could contain the XSLT macro call which would show the related media items in the manner I would like them to be shown :)))

      My unknowns, for now alteast, how to programmatically add items to the ultimate picker property (I've searched for but couldn't find any examples but I'm guessing something like document.getProperty("relatedMedia").Add(nodeID) should hopefully exist and that it could be called numerous times - or instead of nodeID - using (nodeID1 + "," + nodeID2...) since I've read Ultimate Picker holds comma separated data). Also, what to use to identify and clear links, which is crucial...maybe HTML Agility Pack...but I'm a bit uncertain if and what will stay behind after clearing the links (I'm afraid of empty <p></p> tags and such things). So, if anyone could help I'd appreciate it a lot. TIA

     

     

Please Sign in or register to post replies

Write your reply to:

Draft