Super!!! Thanks!!!
I'm sorry I have one more question. If I have some custom properties added to my File MediaType. How would I access them. My custom MediaType property is "documentMetaData".
O, totally missunderstod. Kind of funny. I thought there was a new extension method with that name - customProperty. But of course, it's the strongly typed property name.
Not a bug, rather i how to question
Would you like to show a code snippet, on how to use the GetMedia extension?
Hi Jerker
Ofcourse. Here's an example where I pass a media picker item to the macro
Thanks a lot!
But how do I use it with Razor syntax?
I tried:
var pdfThumb = Flexit.PdfThumbnails.Extension.GetMedia(item.Id, false);
But there are not an pdfThumb.GetPropertyValue() extension available.
Hi Jerker
I didn't include a Razor helper, because I didn't know how to.
Bu I've just updated the package, and now there is a Razor helper - see package description for a Razor example
/Bo
Super!!! Thanks!!! I'm sorry I have one more question. If I have some custom properties added to my File MediaType. How would I access them. My custom MediaType property is "documentMetaData".
I tried:
@pdf.Media.GetPropertyValue("documentMetaData").ToString()
When I check to see if there was a property with that name with:
pdf.Media.HasProperty("documentMetaData").ToString()
I got false.
I guess that your helper doesn't include custom properties? Or how would I go about it?
Hi Jerker
That's weird. I think it's a bug in Umbraco. If I try to get "umbracoFile" it works as expected, but I dont get a custom property. I'll look into it.
/Bo
Are you able to get you custom property using @Library.MediaById or any other function? I can't in 6.1.6
/Bo
I use Umbraco.TypedMedia(). It works well in 6.1.5.
Hmm... are you using MVC or WebForms? I can't find the Umbraco.TypedMedia namespace
MVC
In an Partiel View Macro I have this:
Apparently GetProperty doesn't work. You should use @pdf.Media.customProperty
/Bo
That was a new one to me. Havn't seen that one before. Thanks!
O, totally missunderstod. Kind of funny. I thought there was a new extension method with that name - customProperty. But of course, it's the strongly typed property name.
is working on a reply...