Foren

LIferay UI tags in FreeMarker Template (FTL)

thumbnail
Tahir Noor Khaliq, geändert vor 6 Jahren.

LIferay UI tags in FreeMarker Template (FTL)

Junior Member Beiträge: 35 Beitrittsdatum: 05.02.15 Neueste Beiträge
Hi,
I have a requirement to use FreeMarker Template to create view in my portlets so
How to use Liferay Ui tags (search container ,creating url etc) in FreeMarker Template (FTL). Is there any documentation available.
Thanks
thumbnail
Andrew Jardine, geändert vor 6 Jahren.

RE: LIferay UI tags in FreeMarker Template (FTL)

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
I have a clarification question before I can help (I think I can help anyway emoticon).

For the FTL being used to render your portlet. Are you trying to do it in place of JSP? or are you trying to do is with Application Display Templates? Or are you not sure and looking for direction on this front as well?
thumbnail
Tahir Noor Khaliq, geändert vor 6 Jahren.

RE: LIferay UI tags in FreeMarker Template (FTL)

Junior Member Beiträge: 35 Beitrittsdatum: 05.02.15 Neueste Beiträge
Hi , thanks for reply,
Trying to do it in place of JSP.
thumbnail
Andrew Jardine, geändert vor 6 Jahren.

RE: LIferay UI tags in FreeMarker Template (FTL)

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
In that case I would consider making your portlet class extend the FreemarkerPortlet class that is part of the Liferay API. The FreemarkerPortlet class extends the MVCPortlet class that Liferay also provides so you are stuck creating "Liferay Portlets" -- meaning that they are not portable, but doesn't sound like it will be an issue for you anyway.

Once you have changed your portlet class to extends from the FreemakerPortlet class, then you can switch to using ftl and use all the usual mechanisms -- but specifying ftl in place of jsp.