Forums de discussion

Post maintenance message across all instances

Kevin Niekamp, modifié il y a 10 années.

Post maintenance message across all instances

Junior Member Publications: 42 Date d'inscription: 11/12/08 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