Hi Akshat,
could u help me out on this :
I want the dcrlist & its information from category products to be displayed in the output of .tpl file for another category resources . i can't seem to get around it
very thankful if some one could guide me around it
i have a doubt . in the resources.tpl i want this tpl to iterate through the products directory under /templatedata/nttnet/products/data/$dcrlist , for the available dcr's and display the dcr title , description and link to pdf in the page generated through resources.tpl that is in
/templatedata/nttnet-cz/resources/presentation/resources.tpl
the error i keep getting is :
Could not process template: /.iwmnt/default/main/NAV/WORKAREA/dev/templatedata/nttnet-cz/resources/presentation/resources.tpl
:/default/main/NAV/WORKAREA/dev/templatedata/nttnet-cz/resources/presentation/resources.tpl
could u take a look at the .tpl file and give me suggestions , how to modify it
<?xml version="1.0" encoding="UTF-8"?>
<iw_pt name="resources"><![CDATA[
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
]]>
<iw_perl>
<![CDATA[
$com="<cfinclude template=\"/templates3/header.cfm\">";
iwpt_output($com);
$com1="<cfinclude template=\"/templates3/library/header.cfm\">";
iwpt_output($com1);
]]>
</iw_perl>
<iw_perl><![CDATA[
$part = 'dirname';
my $directoryName = iwpt_get_dcr_name($part);
$dir_name=$directoryName;
if($dir_name =~ m/products/) {
$incldir = "products";
}
else($dir_name =~ m/solutions/) {
$incldir = "solutions";
}
opendir(THISDIR, "$directoryName") or die "cannot open: $!";
@dirList = grep {$_ ne 'products' and $_ ne 'solutions'} readdir THISDIR;
closedir THISDIR;
]]>
</iw_perl>
<![CDATA[
<TABLE border="0" cellspacing="0" cellpadding="0" width="718">
<tr valign="bottom">
<td width="125"><img src="/images/spacer.gif" width="125" height="1"></td>
<td width="593">
<CFIF IsDefined("COOKIE.Library")>
<P><b class="orange">Welcome <cfoutput>#COOKIE.Library#</cfoutput>!</b>
<P>Below you will find a list of helpful resouces.
<P>
]]>
<iw_iterate list='dcr.res_library' var='res'>
<![CDATA[
<ul>
<img src="/images/icons/<iw_value name='res.Icon' />" width="27" height="12">
<a href="<iw_value name='res.file' />" class="prodBlue2"><b><iw_value name='res.Title' /></b></a>(218KB, .PDF)
</ul>
]]>
</iw_iterate>
<iw_iterate var='$dcrList' list='(
@dirList)'>
<iw_load_dcr var='name' file='/templatedata/nttnet/$incldir/data/$dcrList'/>
<iw_if expr='{iw_value name="$incldir" /}eq "products" '>
<iw_then>
<b><a href="/products/index.cfm?resources={iw_value name='$dcrList'/}" class="blackH3"><iw_value name='name.Products.PDF.Title'/></a></b><br/><iw_value name='name.Products.PDF.Description1'/><br><iw_value name='name.Products.PDF.Link to PDF' />
</iw_then>
</iw_if>
]]>
</iw_iterate>
<![CDATA[
<CFELSE>
<cflocation url="/library/index.cfm">
</CFIF> </td></tr>
</TABLE>
]]>
<iw_perl>
<![CDATA[
$com="<cfinclude template=\"/templates3/footer.cfm\">";
iwpt_output($com);
]]>
</iw_perl>
</iw_pt>
Thanks
Edited by krishna1288 on 03/21/03 11:41 AM (server time).