Hi Folks, I first send this email tot he wrong list. I'm sorry about it. Here the Message:
I have problems with openutils SimpleMedia. I don't know if this is the right place for this kind of question but I did not find mailing lists or forums for SimpleMedia. We use SimpleMedia Version 4.2.0 with Magnolia 4.3.2. My problem is using the media Taglib from SimpleMedia in Freemarker. Here is a freemarker snippet: [#assign media=JspTaglibs["http://net.sourceforge.openutils/mgnlMedia"]] [[email protected] property="img" /] In data node "img" is a uuid stored which points to an image. This uuid was created with a dialog with controlType media. I get following error: on line 4, column 1 in module/paragraphs/teaser/teaser_img_bg.ftl media.media not found. The problematic instruction: ---------- ==> user-directive media.media [on line 4, column 1 in module/paragraphs/teaser/teaser_img_bg.ftl] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: on line 4, column 1 in koop-cms-templating/paragraphs/teaser/teaser_img_bg.ftl media.media not found. . and so on . I don't get why I cannot access this tag. I also tried to use some functions like ${media.url(img)} and I get the same error "bla bla media.url not found" I don't know how to fix this problem. Cheers, Bao ============================================================================================ Grégory Joseph answered: >Hi Bao, > >This type of question belongs to the users list - dev-list is for >discussions related to the development of Magnolia itself. > >Anyway, are you sure the taglib is loaded/available to your ftl ? > >You might want to try to print out ${media} and see what happens - it's >a crude hack to verify this, but if the taglib is indeed recognized, >this should print out something like "Expecting a string, date or number >here, Expression media is instead a >freemarker.ext.jsp.TaglibFactory$Taglib" > >hth, > >-greg ============================================================================================ I answer: I tried ${media} and got following: >Error on line 4, column 3 in module/paragraphs/teaser/teaser_img_bg.ftl >Expecting a string, date or number here, Expression media is instead a >freemarker.ext.jsp.TaglibFactory$Taglib >The problematic instruction: >---------- >==> ${media} [on line 4, column 1 in >module/paragraphs/teaser/teaser_img_bg.ftl] >---------- So this taglib is recognized, but why can't I use it? ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
