Hey Everyone,

I've managed to get it working with the help from both Will and Matteo. Thanks 
guys.

It's using the <cms:out> tag. The trick is to ensure the correct combination of 
attributes are used. 

nodeDataName: Tells the tag where to find the UUID
uuidToLink: Tells the tag that I want to convert a UUID to a web link (absolute 
ensures the full path with extension is returned)
uuidToLinkRepository: Tells the tag that it should look up UUID in this 
particular repository
var: Tells the tag to output the link into this variable for further processing

See my working JSP paragraph template below

<!-- -------------- textWithImage Paragraph -------------- -->

<%@ taglib prefix="cms" uri="cms-taglib" %>
<%@ taglib prefix="cmsu" uri="cms-util-taglib" %>
<cms:editBar />
<cms:ifNotEmpty nodeDataName="imgBinary">
   <cms:out nodeDataName="imgBinary" var="imageUrl" />
   <img class="float-${content.imgAlignment}" width="100" height="120" 
alt="firefox" src="${pageContext.request.contextPath}${imageUrl}" />
</cms:ifNotEmpty>

<cms:ifNotEmpty nodeDataName="imgDmsUUID">
   <cms:out nodeDataName="imgDmsUUID" uuidToLinkRepository="dms" 
uuidToLink="absolute" var="imageUrl" />
   <img class="float-${content.imgAlignment}" width="100" height="120" 
alt="firefox" src="${pageContext.request.contextPath}${imageUrl}" />
</cms:ifNotEmpty>
<cms:out nodeDataName="text" />

<!-- -------------- END textWithImage Paragraph -------------- -->

Thanks again. I'm pleased to see this mailing list is active. Thanks for the 
quick responses.

Cheers,

Brent


-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Will Scheidegger
Sent: Tuesday, 9 June 2009 7:19 PM
To: Magnolia User-List
Subject: Re: [magnolia-user] Re: Rendering Image from DMS


On 09.06.2009, at 11:03, Matteo Pelucco wrote:

> Mmm...
> I think you are right, because I've already see before that asking  
> for a resource with a wrong file extension will cause Magnolia  
> serving the "right" resource with a wrong mimetype.

Well, I've seen this happen (coming from the dms) even with the  
correct extensions ;-)

-will


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to