Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Srikanth Adepu
How to use custom tag libs in velocity templates
September 15, 2013 1:11 PM
Answer

Srikanth Adepu

Rank: New Member

Posts: 11

Join Date: October 31, 2012

Recent Posts

Hi,

I want to use the custom taglibs in my theme portal_normal.vm file. I have writtem my own sample tag lib. However, i was able to use my tag lib in freemaker tamplate (portal_normal.ftl) but not in velocity template.

I am loading tag libs in portal_normal.ftl for my custom theme as below

<#assign custom=PortalJspTagLibs["/WEB-INF/tld/liferay-custom.tld"]>
<@custom.updateUrl filePath="/custom/theme/css/transit.css"/>


I need to use the same for velocity template. Can any one explain me how to load and call the tag support class from velocity template that means from portal_normal.vm file.

I have written my own custom tag lib. Not using any liferay aui tag libs here. Please suggest me on this

Thanks,
Srikanth
Srikanth Adepu
RE: How to use custom tag libs in velocity templates
September 16, 2013 10:32 AM
Answer

Srikanth Adepu

Rank: New Member

Posts: 11

Join Date: October 31, 2012

Recent Posts

Can any one give a solution on this?
Srikanth Adepu
RE: How to use custom tag libs in velocity templates
September 17, 2013 10:14 AM
Answer

Srikanth Adepu

Rank: New Member

Posts: 11

Join Date: October 31, 2012

Recent Posts

Guys, did anyone used JSP taglibs in custom theme velocity templates (portal_normal.vm)

Please give me some solutions..
Mika Koivisto
RE: How to use custom tag libs in velocity templates
September 17, 2013 12:16 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1513

Join Date: August 7, 2006

Recent Posts

It's not supported in Velocity you can only use taglibs in Freemarker templates and even that excludes web content templates even if they are freemarker templates.