Foren

display journal article using structure and template

thumbnail
chirag dashalaniya, geändert vor 11 Jahren.

display journal article using structure and template

Regular Member Beiträge: 129 Beitrittsdatum: 21.12.11 Neueste Beiträge
#set ($journalArticleLocalService = $serviceLocator.findService('com.liferay.portlet.journal.service.JournalArticleLocalService'))
#set ($curArticle = $journalArticleLocalService.getArticle($groupId,'10717'))
## get current value 10717 is article id
#set ($document = $saxReaderUtil.read($curArticle.getContent()))
#set ($root = $document.getRootElement())
#set ($contentC = $root.selectSingleNode("static-content"))
${contentC.text}

This is really too good and work with structure and template so powerful!!!!!

@@@is there any query regarding this post then post here i will replay as soon as possible@@@
unike az, geändert vor 11 Jahren.

RE: display journal article using structure and template

New Member Beitrag: 1 Beitrittsdatum: 05.04.13 Neueste Beiträge
I am using approximately the same code to get all articles with a specific structure
I have two articles which display date is in 2013, and it works very well but if I change the display date year ( for exemple 2010) for one article I get nothing.
Please, need a help emoticon
thumbnail
chirag @ India, geändert vor 11 Jahren.

RE: display journal article using structure and template

Regular Member Beiträge: 129 Beitrittsdatum: 21.12.11 Neueste Beiträge
For Display All Journal Articles of company below Code is working ,but one problem is that it display all version of web content ,i want latest one only and particular filter By structure Id.

#set ($curArticle = $journalArticleLocalService.getCompanyArticles($companyId,0,-1,-1))

Help Me