cancel
Showing results for 
Search instead for 
Did you mean: 

taglib IN FreeMarket

asianirish
Champ in-the-making
Champ in-the-making
Has anybody tried to use Alfresco taglib-tags like a:actionLink and r:actions etc in FreeMarker ftl file? Freemarker.org gives an example:

In FreeMarker <html:form action="/query">…</html:form>  is just static text, so it is printed to the output as is, like any other XML or HTML markup. JSP tags are just FreeMarker directives, nothing special, so you use FreeMarker syntax for calling them, not JSP syntax: <@html.form action="/query">…</@html.form>. Note that in the FreeMarker syntax you don't use ${…} in parameters as in JSP, and you don't quote the parameter values. So this is WRONG:

<#– WRONG: –>
<@my.jspTag color="${aVarialbe}" name="aStringLiteral"
            width="100" height=${a+b} /> 
and this is good:
<#– Good: –>
<@my.jspTag color=theColor name="aStringLiteral"
            width=100 height=a+b /> 



but it doesn't work in alfresco :cry:
When I'm trying to use  <@a.actionLink > it displas error something like "undefined tag a"
I couldn't use the construction <#assign a=JspTaglibs["/WEB-INF/alfresco.tld"]> either
3 REPLIES 3

mikeh
Star Contributor
Star Contributor
Those are made available via the Freemarker servlet (which is the topic of the page that quote came from), which isn't used in Alfresco.

Mike

asianirish
Champ in-the-making
Champ in-the-making
Thank you Mike for replay. As I've understood it isn't possible to add taglibs into ftls  :cry: Or maybe someone here has experience of doing a trick to make it possible :?:

robegf
Champ in-the-making
Champ in-the-making
I've found this post about JForum:

http://www.jforum.net/posts/list/3422.page