Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Manish Kumar Jaiswal
how to get structure Name within Templet via velocity
12 de Fevereiro de 2013 05:51
Resposta

Manish Kumar Jaiswal

Ranking: Regular Member

Mensagens: 133

Data de entrada: 25 de Novembro de 2008

Mensagens recentes

Is there a way to get structure Name within Template via velocity ?

Regards
Manish
Kowbathullah Gnaniyar
RE: how to get structure Name within Templet via velocity
12 de Fevereiro de 2013 06:21
Resposta

Kowbathullah Gnaniyar

Ranking: Liferay Master

Mensagens: 608

Data de entrada: 19 de Dezembro de 2007

Mensagens recentes

You can get it through service locator:

#set ($journalStructureService = $serviceLocator.findService('com.liferay.portlet.journal.service.JournalStructureLocalService'))
James Falkner
RE: how to get structure Name within Templet via velocity
12 de Fevereiro de 2013 07:05
Resposta

James Falkner

Community Moderator

Ranking: Liferay Legend

Mensagens: 1406

Data de entrada: 17 de Setembro de 2010

Mensagens recentes

Manish Kumar Jaiswal:
Is there a way to get structure Name within Template via velocity ?

Regards
Manish


This may also work

1#set ($groupId = $getterUtil.getLong($groupId))
2#set ($journalArticleLocalService = $serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService"))
3#set ($journalStructureLocalService = $serviceLocator.findService("com.liferay.portlet.journal.service.JournalStructureLocalService"))
4#set ($curArticle = $journalArticleLocalService.getArticle($groupId, $reserved-article-id.data))
5#set ($curArticleStructure = $journalStructureLocalService.getStructure($groupId, $curArticle.getStructureId()))
6#set ($curArticleStructureName = $curArticleStructure.getName())