Foros de discusión
how to get structure Name within Templet via velocity
Manish Kumar Jaiswal, modificado hace 11 años.
how to get structure Name within Templet via velocity
Regular Member Mensajes: 153 Fecha de incorporación: 25/11/08 Mensajes recientes
Is there a way to get structure Name within Template via velocity ?
Regards
Manish
Regards
Manish
Gnaniyar Zubair, modificado hace 11 años.
RE: how to get structure Name within Templet via velocity
Liferay Master Mensajes: 722 Fecha de incorporación: 19/12/07 Mensajes recientes
You can get it through service locator:
#set ($journalStructureService = $serviceLocator.findService('com.liferay.portlet.journal.service.JournalStructureLocalService'))
#set ($journalStructureService = $serviceLocator.findService('com.liferay.portlet.journal.service.JournalStructureLocalService'))
James Falkner, modificado hace 11 años.
RE: how to get structure Name within Templet via velocity
Liferay Legend Mensajes: 1399 Fecha de incorporación: 17/09/10 Mensajes recientesManish Kumar Jaiswal:
Is there a way to get structure Name within Template via velocity ?
Regards
Manish
This may also work
#set ($groupId = $getterUtil.getLong($groupId))
#set ($journalArticleLocalService = $serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService"))
#set ($journalStructureLocalService = $serviceLocator.findService("com.liferay.portlet.journal.service.JournalStructureLocalService"))
#set ($curArticle = $journalArticleLocalService.getArticle($groupId, $reserved-article-id.data))
#set ($curArticleStructure = $journalStructureLocalService.getStructure($groupId, $curArticle.getStructureId()))
#set ($curArticleStructureName = $curArticleStructure.getName())