Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
chirag @ India
display journal article using structure and template
April 13, 2013 12:38 AM
Answer

chirag @ India

Rank: Regular Member

Posts: 129

Join Date: December 20, 2011

Recent Posts

#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
RE: display journal article using structure and template
April 5, 2013 3:33 AM
Answer

unike az

Rank: New Member

Posts: 1

Join Date: April 5, 2013

Recent Posts

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
chirag @ India
RE: display journal article using structure and template
April 13, 2013 12:44 AM
Answer

chirag @ India

Rank: Regular Member

Posts: 129

Join Date: December 20, 2011

Recent Posts

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