Foren

custom web content display

thumbnail
Jignesh R Vachhani, geändert vor 14 Jahren.

custom web content display

Liferay Master Beiträge: 803 Beitrittsdatum: 10.03.08 Neueste Beiträge
Hi Everyone,

If we want to show wen content by clicking on particular web content title link its very easy to render the content.

Just use this service :

String languageId = LanguageUtil.getLanguageId( renderRequest );

String content = JournalContentUtil.getContent(themeDisplay.getScopeGroupId(),articleId,journalArticleObj.getTemplateId(),languageId,"view",themeDisplay);


so in this method we can pass article id value from renderRequest parameter.

And we can get whole content easily with proper templates also.

Thanks,
Jignesh
Mohammad Kermani, geändert vor 14 Jahren.

some tips!

New Member Beitrag: 1 Beitrittsdatum: 18.02.10 Neueste Beiträge

Hi,
Above sample did not work as it is.
1.don't forget the <liferay-theme:defineObjects/> (to initiate themeDisplay)
2. copy all jars from root/web-inf/lib to your lib!!!! (all packages are not needed but copy them!!,you'll not pay for it!! there's some lists on the net to copy which packages)