Forum

Accueil » Liferay Portal » English » 3. Development

Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
Kevin Niekamp
Post maintenance message across all instances
4 novembre 2013 20:17
Réponse

Kevin Niekamp

Rang: Junior Member

Publications: 42

Date d'inscription: 11 décembre 2008

Publications Récentes

What would be the best way to post a system maintenance type of message across of virtual instances? I have added the section of code below to "top_messages.jsp", and it works, however not sure I like it.

<code>
com.liferay.portlet.journal.model.JournalArticle article = com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil.getDisplayArticleByUrlTitle(10162,"site-maintenance");
if (article != null)
{
com.liferay.portlet.journal.model.JournalArticleDisplay content = com.liferay.portlet.journalcontent.util.JournalContentUtil.getDisplay(10162,article.getArticleId(),null,themeDisplay.getLanguageId(),themeDisplay);
%>
<%=content.getContent()%>
<%
}
</code>

Does anyone have a better solution? I would like to utilize Liferay web content so I can handle localization and use the scheduler.

Thanks,
Kevin