Forums de discussion

LIferay UI tags in FreeMarker Template (FTL)

thumbnail
Tahir Noor Khaliq, modifié il y a 6 années.

LIferay UI tags in FreeMarker Template (FTL)

Junior Member Publications: 35 Date d'inscription: 05/02/15 Publications récentes
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, modifié il y a 6 années.

RE: LIferay UI tags in FreeMarker Template (FTL)

Liferay Legend Publications: 2416 Date d'inscription: 22/12/10 Publications récentes
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, modifié il y a 6 années.

RE: LIferay UI tags in FreeMarker Template (FTL)

Junior Member Publications: 35 Date d'inscription: 05/02/15 Publications récentes
Hi , thanks for reply,
Trying to do it in place of JSP.
thumbnail
Andrew Jardine, modifié il y a 6 années.

RE: LIferay UI tags in FreeMarker Template (FTL)

Liferay Legend Publications: 2416 Date d'inscription: 22/12/10 Publications récentes
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.