Author: mcardle
Date: Thu Aug 3 06:46:09 2006
New Revision: 339
URL:
https://svndev.jahia.net/websvn/listing.php?sc=1&rev=339&repname=corporate_portal_templates_v2
Log:
* fixed invalidation button
* now uses page title to notify ESI server bypassing
Modified:
trunk/src/jsp/common/top.inc
Modified: trunk/src/jsp/common/top.inc
URL:
https://svndev.jahia.net/websvn/diff.php?path=/trunk/src/jsp/common/top.inc&rev=339&repname=corporate_portal_templates_v2
==============================================================================
--- trunk/src/jsp/common/top.inc (original)
+++ trunk/src/jsp/common/top.inc Thu Aug 3 06:46:09 2006
@@ -22,7 +22,8 @@
<%@ page import="org.jahia.utils.*" %>
<%@ page import="org.jahia.services.sites.*" %>
<%@ taglib uri="JahiaLib" prefix="jahia" %>
-
+<%@ page import="org.jahia.settings.SettingsBean"%>
+<%@ page import="org.jahia.services.esi.EsiSOAPInvalidatorService"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -260,6 +261,28 @@
<% } %>
</jesi:fragment>
+<jesi:codeblock execute="template" onerror="ignore">
+
+ <%
+ //Display special info when ESI is enabled
+ if (jData.getProcessingContext().settings().isEsiCacheActivated()) { %>
+ <esi:remove><script language="JavaScript">
document.title=document.title+' (non-ESI parsed/cached)';</script> </esi:remove>
+ <%
+ String esiInvParam = request.getParameter("esi");
+ String isFragmentRequested = request.getParameter("__esi_fragment");
+ if (esiInvParam!=null && esiInvParam.equalsIgnoreCase("invalidateNow")
+ && isFragmentRequested==null) {
+ //invalidate page and all its fragments
+
ServicesRegistry.getInstance().getEsiSOAPInvalidatorService().SOAPInvalidatePageAndAllFrags(jData.params(),
jData.params().getPageID() );
+ %><script>
+ <!--
+ esiForwardToOrginalUrl();
+ //-->
+ </script>
+ <% } %>
+<% } %>
+</jesi:codeblock>
+
<jesi:fragment aclGroup="true" alwaysInvalidate="true">
<div id="wrapper">
<div id="toplinks"><%@ include
file="/jsp/jahia/topbar/operationbuttons.inc"%></div>