Copied to clipboard

Flag this post as spam?

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


  • Saied 349 posts 674 karma points
    Oct 13, 2015 @ 03:06
    Saied
    0

    Relate media folders to external database records?

    I have an external database that has part numbers. These numbers look are numbers like 7027, 7398, 7280.

    In my media section, I created folders with the same names as the part numbers to correspond to media relating to that part number. This works, but it to the content manager, it is not clear what 7027 means. Is there way to still use 7027, but have something more meaningful to the user display as a folder name? Currently, I am doing something like this:

    var productFolder = Umbraco.TypedMediaAtRoot().DescendantsOrSelf("ProductFolder").FirstOrDefault(x=>x.Name = "7027")
    
  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Oct 13, 2015 @ 11:00
    Hendy Racher
    0

    Hi Saied,

    How about using a textstring or label property on the folder to indicate the part number and then using a friendly name for the visible name in the tree ?

    (Incidentally if it's a SQL database, then the nuPickers package has some SQL property editors that could be used to set the part numbers on the media item by querying the database)

    HTH, Hendy

  • Saied 349 posts 674 karma points
    Oct 13, 2015 @ 11:32
    Saied
    0

    Hi Hendy,

    I actually downloaded your nuPickers package. I did think about your approach and was curious how would that change my query in my previous post if I went of a textstring or label property on the media type? Currenly, I am looking for a folder with that name, but now I would have to find the folder that has a label or textstring with that part number. Do you have sample code and does it decrease performance?

    Thanks, Saied

Please Sign in or register to post replies

Write your reply to:

Draft