Dear all,
I have many DCRs need to load into a PT and generate an index page.
Does any one can teach me how to do it? Since I spend lots of time on reading the manual, but it doesn't help much.
my code in pt:
###############################
<br> my $rootdir = "Y:/default/main/dhk/canada/WORKAREA/canada";<br> my $dir = "/templatedata/PressReleases/Detail/data";<br> my
@detailDCRs = '';<br><br> opendir(DIR, $rootdir.$dir);<br>
@detailDCRs = readdir(DIR);<br> closedir(DIR);<br> <br> foreach $MyDCR (
@detailDCRs) {<br> next if ($MyDCR =~ /^\.\.?$/);<br> iwpt_load_dcr("$dir/$MyDCR",'docroot','t');<br> iwpt_output($MyDCR);<br> }<br><br>
@dcrs = iwpt_dcr_list('dcr');<br> $dcr_count = scalar(
@dcrs);<br><br> for ($count = 1; $count < $dcr_count; $count++) {<br> my $Date = iwpt_dcr_value('dcr[$count].rc.Content.Date');<br> my $Title = iwpt_dcr_value('dcr[$count].rc.Content.Title');<br><br> iwpt_output($Date.".......".$Title);<br><br> }<br><br><br>
###############################
In the above code, I can get and print out the name of each DCR in foreach loop.
But when I need to print out the content of each DCR in for loop, I cannot print out the name of each DCR.
Does any one can teach me how to solve the problems? Since I'm fresh in Perl and TeamSite. Kindly if an example code can provide for me as reference.
Thank you very much.