Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
andres digiovanni
Use ui taglib in velocity
March 5, 2013 1:04 PM
Answer

andres digiovanni

Rank: New Member

Posts: 14

Join Date: September 18, 2012

Recent Posts

Hi!

I need to use an ui taglib inside a velocity template. I tried to use:

1<liferay-ui:asset-links
2    className="com.liferay.portlet.journal.model.JournalArticle"
3    classPK="$resourceprimKey"
4/>


And this:

1$taglibLiferay.asset-links("com.liferay.portlet.journal.model.JournalArticle", $resourceprimKey)


But don't work, the are any method to do this?

Thank you.
Andrés.
Anonymous
RE: Use ui taglib in velocity
March 5, 2013 1:43 PM
Answer

Anonymous

I heard there is a way to use taglibs in velocity but it sounded like there was alot of code involved, Freemarker allows for it to be done with less code.

https://www.liferay.com/web/mika.koivisto/blog/-/blogs/using-freemarker-in-your-theme-templates
andres digiovanni
RE: Use ui taglib in velocity
March 6, 2013 12:31 AM
Answer

andres digiovanni

Rank: New Member

Posts: 14

Join Date: September 18, 2012

Recent Posts

Hi,

thank you for the information but i need to use a velocity template because i'm using a web content template.

Regards,
Andrés
Anonymous
RE: Use ui taglib in velocity
March 6, 2013 9:12 AM
Answer

Anonymous

Tag libraries
Yes, you read it correctly. You can use taglibs in your Freemarker templates. This is something unique to Freemarker and it is limited to only templates in themes. To import a portal taglib to your template just add following line to your template:


I'm pretty sure you can't add taglibs via web content template
andres digiovanni
RE: Use ui taglib in velocity
March 7, 2013 1:53 AM
Answer

andres digiovanni

Rank: New Member

Posts: 14

Join Date: September 18, 2012

Recent Posts

Ok, thank you. I'll think another way to do.

Regards,
Andrés
Steven Chen
RE: Use ui taglib in velocity
December 19, 2014 1:49 PM
Answer

Steven Chen

Rank: New Member

Posts: 3

Join Date: March 21, 2014

Recent Posts

Edit* I believe I entered the answer to the wrong question in the wrong post.

Here is an edit to the right answer.

https://www.liferay.com/community/forums/-/message_boards/message/36678047