Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Using Clay taglib for Clay components from ADT
Hi community
What would be the correct way to render clay components from a Freemarker template?
Can I use the clay taglib from within a Freemarker template? How?
Regards!
What would be the correct way to render clay components from a Freemarker template?
Can I use the clay taglib from within a Freemarker template? How?
Regards!
All right.. the answare was in the online doc
https://dev.liferay.com/es/develop/tutorials/-/knowledge_base/7-1/using-the-clay-taglib-in-your-portlets
The Liferay Clay taglib is also available via a macro for your FreeMarker theme templates and web content templates. Follow this syntax:
https://dev.liferay.com/es/develop/tutorials/-/knowledge_base/7-1/using-the-clay-taglib-in-your-portlets
The Liferay Clay taglib is also available via a macro for your FreeMarker theme templates and web content templates. Follow this syntax:
[code]<@clay["tag-name"] attribute="string value" attribute=10 />
Although being totally correct, it threw me off as to why you had the "\[code\]" tag in front of it. But realizing after a minute that it's probably some sort of forum mishap that this is still shown.
I wanted to give an example as to how I used it in a freemarker template in DXP 7.2.
I think that the Liferay space is overflowing with information, and although there have been improvements to the documentation from the side of the organisation, there's still a lot to be done, so I try to add snippets that I've used to relevant topics, because often, that's what I needed when searching for an answer.
(I know that this is a year old post) But thanks for posting the answer to your own question, this is very helpful to people searching the same thing and double frustrating if the op just writes "Never mind, found the answer" but doesn't post the answer ;).
I wanted to give an example as to how I used it in a freemarker template in DXP 7.2.
<@clay["icon"] symbol="angle-down" />
I think that the Liferay space is overflowing with information, and although there have been improvements to the documentation from the side of the organisation, there's still a lot to be done, so I try to add snippets that I've used to relevant topics, because often, that's what I needed when searching for an answer.
(I know that this is a year old post) But thanks for posting the answer to your own question, this is very helpful to people searching the same thing and double frustrating if the op just writes "Never mind, found the answer" but doesn't post the answer ;).
Satyanarayana kolliboyin, modified 5 Years ago.
Junior Member
Posts: 26
Join Date: 6/23/10
Recent Posts
I wanted to give an example as to how I used it in a freemarker template in DXP 7.2.In my case under page fragments need to use with square brackets instead of less than and greather than symbols.<@clay["icon"] symbol="angle-down" />
Example 1: [@clay["icon"] symbol="angle-down" /]
Example 2: <a class="text-black"
href="http://www.facebook.com/pages/Liferay/45119213107"
target="_blank">
<span class="hide">Facebook</span>
[@clay["icon"] symbol="social-facebook" /]
</a>
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™