Foros de discusión

how get time and title in webcontent template

shima shima, modificado hace 9 años.

how get time and title in webcontent template

Junior Member Mensajes: 46 Fecha de incorporación: 14/04/14 Mensajes recientes
hi friends
I have a structure and I show its fields by template but how I can use the reserved field like title , category ,tag , publish time and ext in template????
I have thought ${reserved-article-title.data()} will be useful .but it was not.
thumbnail
Pankaj Kathiriya, modificado hace 9 años.

RE: how get time and title in webcontent template

Liferay Master Mensajes: 722 Fecha de incorporación: 5/08/10 Mensajes recientes
You can get title using code as this : $reserved-article-title.getData() without curly brackets.
thumbnail
Mayur Patel, modificado hace 9 años.

RE: how get time and title in webcontent template

Expert Mensajes: 358 Fecha de incorporación: 17/11/10 Mensajes recientes
Please check this link,
https://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Journal+Template+(Velocity)
shima shima, modificado hace 9 años.

RE: how get time and title in webcontent template

Junior Member Mensajes: 46 Fecha de incorporación: 14/04/14 Mensajes recientes
hi
finally I found it emoticon in free marker reserved-article-title.data() dose not work because of "-" so u can use all reserved value in this format:
${.vars['reserved-article-title'].data}
shima shima, modificado hace 9 años.

RE: how get time and title in webcontent template

Junior Member Mensajes: 46 Fecha de incorporación: 14/04/14 Mensajes recientes
but category and tag is not in the list of reserved value how could I fetch them to show in wcm?emoticon
thumbnail
Mayur Patel, modificado hace 9 años.

RE: how get time and title in webcontent template

Expert Mensajes: 358 Fecha de incorporación: 17/11/10 Mensajes recientes
To get categories and tags, You can use serviceLocator to find appropriate service.

Refer this post for the solution.