I have a doc variable called 'rightSideImage' that is a Media Picker type. When I insert this in a document template (not xslt), it used the media id (eg, 1096) instead of the URL. How do I insert this in a document template? I know how to do it in XSLT but not the template.
You might be aware of this, but typically I make a generic XSLT macro called something like InsertImage that can be inserted into the template to render images. You can pass the value of rightSideImage using the macro parameter syntax, ie: <umbraco:Macro alias="InsertImage" imageId="[#rightSideImage]">. It will work either way, personally I think this is a bit cleaner though.
media in template...HELP
I have a doc variable called 'rightSideImage' that is a Media Picker type. When I insert this in a document template (not xslt), it used the media id (eg, 1096) instead of the URL. How do I insert this in a document template? I know how to do it in XSLT but not the template.
Hi Mark
I'm pretty sure you need to use some inline xslt in the template, but you should be able to render your image like this:
The above code is intended for the new XML schema. But this should render a img-tag with the right path to the image.
/Kim A
You might be aware of this, but typically I make a generic XSLT macro called something like InsertImage that can be inserted into the template to render images. You can pass the value of rightSideImage using the macro parameter syntax, ie: <umbraco:Macro alias="InsertImage" imageId="[#rightSideImage]">. It will work either way, personally I think this is a bit cleaner though.
is working on a reply...