passing a mediaitemURL to a macro as parameter (in a masterpage)
I use a mediapicker to select a headerimage that should be passed on to a macro containing a flash header animation. Now i've found in the documentation that this is possible if i use square brackets like this:
But this ofcourse renders the headerimage nodeId instead of the url to the image...
Is there a way to include the url instead of just the ID ? in xslt it's quite easy thanks to the umbraco.library:GetMedia function, but how could i use this here?
I still don't see any advantage here of passing the url rather than the id of the media item? Just pass the id and get the url from either user control or xslt. You need to query the database anyway as the paths aren't stored in published xml (unless you use an upload field)
How about creating a new parameter type... which accept an integer and your new macro type would be responsible for passing the url of the media item associated with the id through the 'Value' property
Parameter types implement the IMacroGuiRendering interface
passing a mediaitemURL to a macro as parameter (in a masterpage)
I use a mediapicker to select a headerimage that should be passed on to a macro containing a flash header animation. Now i've found in the documentation that this is possible if i use square brackets like this:
<umbraco:macro alias="Flasheader" pagevalue="[#HeaderImage]" runat="server"/>
But this ofcourse renders the headerimage nodeId instead of the url to the image...
Is there a way to include the url instead of just the ID ? in xslt it's quite easy thanks to the umbraco.library:GetMedia function, but how could i use this here?
All help is very much appreciated!
Rik
I was hoping something like this would be possible:
But i'm afraid not... any advice ?
I still don't see any advantage here of passing the url rather than the id of the media item? Just pass the id and get the url from either user control or xslt. You need to query the database anyway as the paths aren't stored in published xml (unless you use an upload field)
Cheers,
/Dirk
Our usercontrols are kept platformindependent... so if we want to use it in sharepoint or umbraco it should always work ...
And that sounds like a great reason...
How about creating a new parameter type... which accept an integer and your new macro type would be responsible for passing the url of the media item associated with the id through the 'Value' property
Parameter types implement the IMacroGuiRendering interface
Hope this helps.
Regards,
/Dirk
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.