Copied to clipboard

Flag this post as spam?

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


  • Steven Moye 9 posts 29 karma points
    May 18, 2011 @ 18:17
    Steven Moye
    0

    API umbraco.library property structure reference

    I'm probably just looking in the wrong place, but I'm trying to find a property list/structure for the umbraco media library and I can't seem to find it in the existing wiki. Specifically, I'm trying to use the Media Picker to create a slideshow of images and videos by selecting the containing Media library folder and then using XSL to create a list of the items in that folder (the photos and videos). Where can I find the documentation on the media library from which I could get an understanding of the structure and the properties of each [node] in the media library?

    Thanks in advance

  • aghy 129 posts 308 karma points
    May 18, 2011 @ 18:39
    aghy
    0

    Hi Steven,

    Media types are just like document types so you can use xslt for the media items just like you would for your content.

    To see the structure of the media items have a look in your db at the cmsContentXml table and find the id of one of your media items.

    Ben

  • Steven Moye 9 posts 29 karma points
    May 18, 2011 @ 19:00
    Steven Moye
    0

    Ok, thanks. Looking in the db helped. Still, is there any other way to find that information (specifically, what helped me was looking into the cmsContentXML table and finding the noteType values for each)? Like, for the content, if I wanted to take a peek at the structure, I would open up the umbraco.config file. Is there a file like that that for the media library, or is the db the only place I can find it?

  • aghy 129 posts 308 karma points
    May 18, 2011 @ 19:21
    aghy
    0

    Ok nodeType is an int which refers to the mediaType but did you know that in xslt if you use name() it will give you the alias of the mediaType which I suppose is the same but I think it's nicer.

    The structure of the media types is in the settings section under Media Types and is exactly like the Document Types. You can create new ones or add more properties to the default ones. Only problem is you cannot have master document types.

    Have a look at the bottom of this page on XSLT Examples updated to New Schema if you haven't already, it shows a simple example of displaying an image in xslt using the GetMedia function.

    Sorry if you know all this already I just know it was helpful when I was getting my head around it. And I dont think there is a file like umbraco.config for media items.

    Ben

  • Steven Moye 9 posts 29 karma points
    May 18, 2011 @ 19:28
    Steven Moye
    0

    Thank you so much for mentioning the media types in the Settings section! I've built a couple sites with umbraco before but never really noticed it was there. That actually solves another problem for me - or at least, gives me a better way of working with it than I originally intended.

    I've gotten accustomed to using nodeTypes to help detect the kind of information I want to display so it's just a personal preference, but still, name() is good to know about. I appreciate all the help. I know it would've taken ages for me to think to check the database for the information I was looking for.

Please Sign in or register to post replies

Write your reply to:

Draft