I've added a Video DocumentType and added two properties to it ("url" and "thumbnail") both of those two are media picker data types (pointing/picking out a Video and an Image MediaType respectively). The umbraco macro call above inside of the template returns the respected MediaType object node IDs insetad of friendly path to those which I should probably get with something like this
umbraco.library:GetMedia($currentPage/data [@alias = 'Video'], 'false')/data [@alias = 'umbracoFile'] instead of just [#videoObject]
What is the best practice for getting media to display...building separate XSLTs that will return appropriate HTML markup...how do you separate your media, how do you bind it to your articles, please share some experiences...TIA
If the macro is only intended to display data for your "Video DocumentType", I wouldn't bother passing each parameters and just let the macro use the "currentPage" parameter to pull out the videoObject and thumbObject from within the xslt. Otherwise passing the page properties as params is a good way to go. Either way let the macro xslt figure out the media path.
For simplicity sake I would try to put as much of the logic in the macro xslt instead of a blend of macro and the template. I generally try to design my macros as plugins which contain all the code for that feature (including html), whether that's a menu or video display.
Can I Get Media Path from node field which is of MediaPicker datatype?!
Is there a way to call a macro inside a template which contains umbraco.library calls as parameters:
I've added a Video DocumentType and added two properties to it ("url" and "thumbnail") both of those two are media picker data types (pointing/picking out a Video and an Image MediaType respectively). The umbraco macro call above inside of the template returns the respected MediaType object node IDs insetad of friendly path to those which I should probably get with something like this
umbraco.library:GetMedia($currentPage/data [@alias = 'Video'], 'false')/data [@alias = 'umbracoFile'] instead of just [#videoObject]
What is the best practice for getting media to display...building separate XSLTs that will return appropriate HTML markup...how do you separate your media, how do you bind it to your articles, please share some experiences...TIA
If the macro is only intended to display data for your "Video DocumentType", I wouldn't bother passing each parameters and just let the macro use the "currentPage" parameter to pull out the videoObject and thumbObject from within the xslt. Otherwise passing the page properties as params is a good way to go. Either way let the macro xslt figure out the media path.
For simplicity sake I would try to put as much of the logic in the macro xslt instead of a blend of macro and the template. I generally try to design my macros as plugins which contain all the code for that feature (including html), whether that's a menu or video display.
IMO:)
-Chris
is working on a reply...