I am trying to create a file that just contains a bit of perl setting the value of one variable:
<?xml version="1.0" encoding="UTF-8"?>
<iw_pt name="GlobalInclude">
<iw_perl><![CDATA[
my $host = '
http://kcdmsdev.ca.pm.com:8333';]]></iw_perl>
</iw_pt>
I want to include this file in my presentation template. However, it seems to be finding the file (I am not getting an error that says it can't find the include), but this value is not being made available. I even tried to just print the contents of the file onto my browser screen, and that failed. What am I doing wrong? Here is my presentation template:
<?xml version="1.0" encoding="iso-8859-1"?>
<iw_pt name="Article">
<iw_include pt='global.tpl' mode='ptlocal'/>
<html>
<![CDATA[ <!-- Begin CDATA tag -->
<!-- HTML stuff is enclosesd in CDATA tag -->
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="expires" CONTENT="fri,31 Dec 1990 10:00:00 GMT">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="refresh" CONTENT="1;url=<iw_value name='host'/>/controller?cmd=ARTICLE_VIEW&lang=<iw_value name='dcr.articleDoc.article.language'/>&aid=<iw_value name='dcr.articleDoc.article.ID'/>&sid=10602&ctx=4000">
<script language="JavaScript1.2">
<!--
// Call the clearCache.jsp and the reloadMenus.jsp.
function clearCaches() {
clearCache = window.open("<iw_value name='host'/>/clearCache.jsp", "", "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=1,height=1");
clearCache.close();
reloadMenus = window.open("<iw_value name='host'/>/reloadMenus.jsp", "", "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=1,height=1");
reloadMenus.close();
}
-->
</script>
<title>Article Preview</title>
</head>
<body onLoad="clearCaches();">
This page will re-direct you to the preview site in 1 second.<BR><BR>
The include file content is:<BR>
<iw_include file='global.tpl' mode='ptlocal' />
</body>
]]> <!-- End CDATA Tag -->
</html>
</iw_pt>
Thanks for your help!
Doreen