掲示板

display journal article using structure and template

thumbnail
11年前 に chirag dashalaniya によって更新されました。

display journal article using structure and template

Regular Member 投稿: 129 参加年月日: 11/12/21 最新の投稿
#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@@@
11年前 に unike az によって更新されました。

RE: display journal article using structure and template

New Member 投稿: 1 参加年月日: 13/04/05 最新の投稿
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
11年前 に chirag @ India によって更新されました。

RE: display journal article using structure and template

Regular Member 投稿: 129 参加年月日: 11/12/21 最新の投稿
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