Can anyone kindly send me an example how we can implement an Image Text 
component using jsp. I have nearly tried out all the options available on 
internet with no success. My code is as given below.

<%@ taglib prefix="cmsfn" 
uri="http://magnolia-cms.com/taglib/templating-components/cmsfn"; %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
<%--@elvariable id="content" type="info.magnolia.jcr.util.ContentMap"--%>
<%--@elvariable id="damfn" 
type="info.magnolia.dam.templating.functions.DamTemplatingFunctions"--%>

<h1>${content.heading}</h1>
<h2>${content.subtitle}</h1>
<p>"Decode-->"+${cmsfn.decode(content).text}</p>
<p>"Caption-->"+${content.imageCaption}</p>
<p>"CopyRight-->"+${content.imageCopyright}</p>
<p>"Description-->"+${content.imageDescription}</p>
<!--<p><img src="${content.image}" alt="${content.imageCaption}" /></p>-->
<!--<p><img src="${damfn.getAssetForId(content.image)}" 
alt="${content.imageCaption}" /></p> -->


<c:if test="${not empty content.image}">
        <p>I am inside</p>
    <%-- Using JSP 2.2 method calling from EL - requires Servlet 3.0 (Tomcat 7) 
--%>
    <%-- On previous versions this exception is thrown: The function 
getAssetLink must be used with a prefix when a default namespace is not 
specified --%>
    <img style="float: right;margin: 10px;" 
src="${damfn.getAssetLink(content.image)}"/><br>    
</c:if>
<p>${cmsfn:decode(content).body}</p>

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=5f239f56-fd3b-4dd8-ac00-fb59b4aa2f1c


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to