Hi Sheetal,

In the freemarker template the 'contextPath' variable is directly available too: <img src="${contextPath}/docroot/img/photo-big.jpg" width="230" height="154" />

Generally this question looks more for the user-list and not for the dev-list.
Please subscribe there too: 
http://documentation.magnolia-cms.com/stay-updated.html
So you can ask such questions in future there.

Thnx in advance!

Greetings
Christian


On Aug 11, 2009, at 13:39 , Zdenek Skodik wrote:


Hi Sheetal,

Magnolia exposes the context object to a ftl,
please try something like the following:

<img src="${ctx.contextPath}/docroot/img/photo-big.jpg"
width="230" height="154" />

-
Best regards,

Zdenek Skodik
Magnolia International Ltd.

 Meet us at the Magnolia Conference
 http://www.magnolia-cms.com/conference

Magnolia®  - Simple Open-Source Content Management


On Po, 2009-08-10 at 17:13 +0100, Sheetal Thaker wrote:
I am trying to reference path names in an ftl file.

In a jsp file it works as follows, but the same command line doesn't
work in the ftl file...

<img src="${pageContext.request.contextPath}/docroot/img/photo- big.jpg"
width="230" height="154" />

any ideas?

Regards

Sheetal



----------------------------------------------------------------
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]>
----------------------------------------------------------------


----------------------------------------------------------------
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