Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Tpl problem
iw_store
Hi ALL,
I have to implement a TPLl in such a way that when it starts parsing a DCR it has to parse another DCR, the path of second one is taken in a text box of first DCR by having a Browse button, while previewing it should display contents of both DCR.
For more details :
I have a datacapture.cfg in which i have a text box, when i click on a button it browses through TemplateData directory, this is mainely done to select a DCR which is already there, after selecting the path upto that dcr and dcr name will come in that text box.
When i save this it will create a new DCR, after parsing this DCR by TPLl, this TPL also has to extract context of referenced DCR as well while previewing.
if any one has done this please tell me the way.
Thanks in advance.
San.
Find more posts tagged with
Comments
Adam Stoller
RTFM (
http://teamsite-server/iw/help/tst/pt
) regarding <iw_load_dcr .../> or <iw_perl>iwpt_load_dcr(...);...</iw_perl>
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
gzevin
to add to what fish has suggested, you could also look for TeamSite:
CRNoode. You can access another DCR using pure perl, without iw_xml tags, using that module.
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
iw_store
Hi ALL,
I tried with code i am getting what i want when i hard code the value of file in : <iw_load_dcr var='zzz' file='/templatedata/Surender/Binary/data/dd' global='t'/>
But when i replace with a variable like : <iw_load_dcr var='zzz' file="$xml11" global='t'/>
I am gettin g error saying dcr could not load.
<?xml version ="1.0" encoding="UTF-8"?>
<iw_pt name="Test">
<iw_ostream>
<![CDATA[
<html> This is Test
<body>
]]>
<iw_perl>
<![CDATA[
my $xml = qq(<?xml version="1.0" encoding="UTF-8"?>);
my $xml11 = " ";
my $fname = "";
my $ctype = "";
$xml .= "\n<root>";
foreach my $d (iwpt_dcr_list('dcr.MasterFeature.Features'))
{
$xml .= iwpt_dcr_value("d.FileName");
$xml .= "\n\t";
$xml .= iwpt_dcr_value("d.control_type");
$xml .= "\n\t";
$xml11 = iwpt_dcr_value("d.ref");
$xml .= $xml11;
}
$xml .= "\n</root>";
iwpt_output($xml);
]]>
<iw_load_dcr var='zzz' file="$xml11" global='t'/>
<![CDATA[
iwpt_output(iwpt_dcr_value('zzz.cat') );
]]>
</iw_perl>
</iw_ostream>
<![CDATA[
</body>
</html>
]]>
</iw_pt>
Can anyone Help me.
thanking in Advance.
San.
iw_store
Hi All,
That was a simple mistake, i got solution.
Thanks ghoti for giving a WAY.
San.