2009-10-25 15:42:08 -05:00
|
|
|
<tal:comment replace="nothing">
|
|
|
|
This page is called by a XmlHttpRequest object. It requires parameters "page" and "macro":
|
|
|
|
they are used to call the macro that will render the HTML chunk to be returned to the browser.
|
|
|
|
It can also have a parameter "action", that refers to a method that will be triggered on
|
|
|
|
contextObj before returning the result of the macro to the browser.
|
|
|
|
</tal:comment>
|
2010-08-05 11:23:17 -05:00
|
|
|
<tal:ajax define="page request/page;
|
|
|
|
macro request/macro;
|
2010-04-30 05:05:29 -05:00
|
|
|
contextObj context/getParentNode;
|
2010-08-05 11:23:17 -05:00
|
|
|
action request/action|nothing;
|
|
|
|
response request/RESPONSE;
|
|
|
|
member context/portal_membership/getAuthenticatedMember;
|
|
|
|
portal context/portal_url/getPortalObject;
|
2010-10-14 07:43:56 -05:00
|
|
|
portal_url python: context.portal_url();
|
2010-08-05 11:23:17 -05:00
|
|
|
template python: contextObj.getPageTemplate(portal.skyn, page);
|
|
|
|
dummy python: response.setHeader('Content-Type','text/html;;charset=utf-8');
|
|
|
|
dummy2 python: response.setHeader('Expires', 'Mon, 11 Dec 1975 12:05:05 GMT');
|
|
|
|
dummy3 python: response.setHeader('CacheControl', 'no-cache')">
|
2010-04-30 05:05:29 -05:00
|
|
|
<tal:comment replace="nothing">Keys "Expires" and "CacheControl" are used for preventing IE to cache
|
|
|
|
this page. Indeed, this page is retrieved through an asynchronous XMLHttpRequest by the browser, and
|
|
|
|
IE caches this by default.</tal:comment>
|
2009-10-25 15:42:08 -05:00
|
|
|
<tal:executeAction condition="action">
|
2010-08-05 11:23:17 -05:00
|
|
|
<tal:do define="dummy python: contextObj.getMethod('on'+action)()" omit-tag=""/>
|
2009-10-25 15:42:08 -05:00
|
|
|
</tal:executeAction>
|
2010-08-05 11:23:17 -05:00
|
|
|
<metal:callMacro use-macro="python: template.macros.get(macro)"/>
|
2009-10-25 15:42:08 -05:00
|
|
|
</tal:ajax>
|