Foros de discusión
velocity theme and journalArticle recovery
nicolas saubi, modificado hace 14 años.
velocity theme and journalArticle recovery
Junior Member Mensajes: 43 Fecha de incorporación: 28/10/09 Mensajes recientes
Version : Liferay 5.2.3
Hello there,
I'm trying to get a
Fact is nothing appears and no errors in logs. It seems $myJournalArticleContent_String is just empty, when the article has been created and approved in the liferay portal. We can display it using a Journal portlet, but not with this part of code, don't know why.
If you have any explanations, feel free to help
Thanks
Hello there,
I'm trying to get a
JournalArticle
from my portal_normal.vm
as follows :
#set($groupUtil = $serviceLocator.findService("com.liferay.portal.service.GroupLocalServiceUtil"))
## recover from liferay-look-and-feel.xml the "communaute" parameter
#set($footerGroup = $groupUtil.getGroup($company_id, $theme_settings.getProperty("communaute")))
#set($footerGroupID_Long = $footerGroup.getGroupId())
## recover from liferay-look-and-feel.xml the ID of the JournalArcticle we want to display
#set($journalArticleId_String = $theme_settings.getProperty("article-id"))
#set($myJournalArticle_JA = $contentUtil.getLatestArticle($footerGroupID_Long,$journalArticleId_String))
#set($myJournalArticleContent_String = $myJournalArticle_JA.getContent())
$myJournalArticleContent_String
Fact is nothing appears and no errors in logs. It seems $myJournalArticleContent_String is just empty, when the article has been created and approved in the liferay portal. We can display it using a Journal portlet, but not with this part of code, don't know why.
If you have any explanations, feel free to help
Thanks
Wilson Man, modificado hace 14 años.
RE: velocity theme and journalArticle recovery
Liferay Master Mensajes: 581 Fecha de incorporación: 21/06/06 Mensajes recientes
you may want to print out all your variables and see which one isn't valid.
also, I don't think contentUtil is available to you. You may want to try $journalContentUtil
also, I don't think contentUtil is available to you. You may want to try $journalContentUtil
Archi Madhu, modificado hace 13 años.
RE: velocity theme and journalArticle recovery
Regular Member Mensajes: 237 Fecha de incorporación: 25/03/08 Mensajes recientes
Hi Nicolas,
This might help you
http://www.liferay.com/community/forums/-/message_boards/message/1324019/maximized?p_p_auth=txRLEBZ7
Cheers,
Archi
This might help you
http://www.liferay.com/community/forums/-/message_boards/message/1324019/maximized?p_p_auth=txRLEBZ7
Cheers,
Archi