META-INF.resources.wiki.error.jsp Maven / Gradle / Ivy
<%--
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
--%>
<%@ include file="/wiki/init.jsp" %>
<%
WikiNode node = (WikiNode)request.getAttribute(WikiWebKeys.WIKI_NODE);
String title = ParamUtil.getString(request, "title");
boolean portletTitleBasedNavigation = GetterUtil.getBoolean(portletConfig.getInitParameter("portlet-title-based-navigation"));
if (portletTitleBasedNavigation) {
portletDisplay.setShowBackIcon(true);
String backURL = request.getHeader(HttpHeaders.REFERER);
if (Validator.isNull(backURL)) {
WikiURLHelper wikiURLHelper = new WikiURLHelper(wikiRequestHelper, renderResponse, wikiGroupServiceConfiguration);
PortletURL backToViewPagesURL = wikiURLHelper.getBackToViewPagesURL(node);
backURL = backToViewPagesURL.toString();
}
portletDisplay.setURLBack(backURL);
renderResponse.setTitle(title);
}
%>
<%
long nodeId = ParamUtil.getLong(request, "nodeId");
if ((nodeId == 0) && (node != null)) {
nodeId = node.getNodeId();
}
PortletURL editPageURL = PortletURLBuilder.createRenderURL(
renderResponse
).setMVCRenderCommandName(
"/wiki/edit_page"
).setRedirect(
currentURL
).setParameter(
"nodeId", nodeId
).setParameter(
"title", title
).buildPortletURL();
PortletURL searchURL = PortletURLBuilder.createRenderURL(
renderResponse
).setMVCRenderCommandName(
"/wiki/search"
).setRedirect(
currentURL
).setKeywords(
title
).setParameter(
"nodeId", nodeId
).buildPortletURL();
%>
>