On May 27, 2011, at 7:27 AM, Magnolia Forums (on behalf of Aditya Sarkar) wrote:

> 
> I need the image path for the dms as I need to construct a structure like ...
> <cms:editButton contentNodeName="imageCollec" dialog="testImageDia" 
> label="Edit" />
> <cms:setNode var="slideData" contentNodeName="imageCollec"/>
> 
> <li class="active">
> <a href="TEST"><img 
> src="${pageContext.request.contextPath}/${slideData.txtimg1Binary}"></a>

this should do: <a href="TEST"><img 
src="${pageContext.request.contextPath}/dms/${slideData.txtimg1Binary}"></a>

Content from other repositories then from website needs to be prefixed with the 
repository specific prefix for Magnolia to know where to look for it, unless 
you do tricks like having virtualURI mappings to remap content based on 
different extensions.

> <img  src="${pageContext.request.contextPath}/${slideData.bkimg1Binary}">
> </li>
> 
> normal upload is working fine with the above code.. but dms is not working. I 
> have tried with String imgPath = LinkHelper.convertUUIDtoHandle(uuid,"dms") 
> but it also
> give some part of the path,

yeah this one gives you handle - that is path to content in repository, not a 
link to access it via web.

> I tried to google it  and found 
> URI2RepositoryManager.getInstance().getURI("dms",dmsHM.getContentByUuid(uuid).getHandle());
>  but this one is also havin some error (dont know what is dmsHM)... Please 
> help me in this one.. its frustrating ...

HierarchyManager dmsHM = MgnlContext.getInstance().getHierarchyManager("dms");

;)


I personally think this is the simplest way:

MagnoliaTemplatingUtilities.createLink("dms", uuid)

HTH,
Jan

> 
> -- 
> Context is everything: 
> http://forum.magnolia-cms.com/forum/thread.html?threadId=69af96e1-d628-4e07-8ccc-8df55cc21313
> 
> 
> ----------------------------------------------------------------
> 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