...Here's what I have right now.my $path="y:/default/main/branch1/WORKAREA/branch1/templatedata/common_indexT/highlights";--- or maybe that should be y:/default/main/branch1/WORKAREA/branch1/templatedata/common_indexT/highlights/data ? --
my $group = (iwpt_dcr_list($path));
Thanks, that may help. I can see where I might have missed building an array of the dcrs, but I still can't figure out where the path would come in.
iwpt_dcr_list() retrieves a list of nodes from a DCR
my $path = "y:/default/main/branch1/WORKAREA/branch1/templatedata/common_indexT/highlights/data/";opendir(DIR, $path);my @full_dcr_names = readdir(DIR);closedir(DIR); my @dcr_names = iwpt_get_dcr_name(); foreach my $nextdcr (@full_dcr_names) {next if ($nextdcr =~ /^\.\.?$/);iwpt_output (" $nextdcr\n");iwpt_load_dcr($nextdcr, 'dcrlocal', 't');my $title = iwpt_dcr_value('dcr.highlight.hiTitle');iwpt_output (" $title\n"); }
my $path = "y:/default/main/branch1/WORKAREA/branch1/templatedata/common_indexT/highlights/data/";opendir(DIR, $path);my @full_dcr_names = readdir(DIR);closedir(DIR); my @dcr_names = iwpt_get_dcr_name(); foreach my $nextdcr (@full_dcr_names) {next if ($nextdcr =~ /^\./);my $lookup = $nextdcr;iwpt_output (" $lookup\n");push (@dcr_names, $lookup);iwpt_load_dcr($lookup, 'dcrlocal', 't');}my @dcr_list = iwpt_dcr_list('dcr'); if (@dcr_list) {foreach my $current_dcr (@dcr_list) {my $current_dcr_name = shift @dcr_names;my $title = iwpt_dcr_value('current_dcr.highlight.hiTitle');iwpt_output (" $title\n"); }}
This item is: ]]><br/><br><b>The item is: </b><br/><br><b>The item is targeted for:</b> <br>}<br>[/html]but, this version of the include doesn't work no matter which mode is set, or how I adapt the path[html]<br><br>my $path = "y:/default/main/branch1/WORKAREA/branch1/templatedata/common_indexT/highlights/data/";<br>opendir(DIR, $path);<br>my @full_dcr_names = readdir(DIR);<br>closedir(DIR); <br><br>my @dcr_names = iwpt_get_dcr_name(); <br>foreach my $nextdcr (@full_dcr_names) {<br>next if ($nextdcr =~ /^\./);<br>my $lookup = $nextdcr;<br># iwpt_output ("$lookup");<br>push (@dcr_names, $lookup);<br>my $dcrx = iwpt_load_dcr($lookup, 'ptlocal', 't');<br>}<br><br>my @dcr_list = iwpt_dcr_list($dcrx); <br>if (@dcr_list) {<br>foreach my $current_dcr (@dcr_list) {<br>my $current_dcr_name = shift @dcr_names;<br>my $title = iwpt_dcr_value('current_dcr.highlight.hiTitle');<br>my $date = iwpt_dcr_value('current_dcr.highlight.hiDate');<br>my $text = iwpt_dcr_value('current_dcr.highlight.hiText');<br>my $readMore = iwpt_dcr_value('current_dcr.highlight.readMoreLink');<br>my $priority = iwpt_dcr_value ('current_dcr.highlight.priorityLevel');<br>my $status = iwpt_dcr_value('current_dcr.highlight.hiStatus');<br>iwpt_output (" <h2>$title</h2>\n"); <br>iwpt_output ("<p><i>$date</i><br/>\n");<br>iwpt_output ("$text");<br>iwpt_output ("<a href=\"$readMore\">read more</a></p>\n");<br>iwpt_output ("<p><b>This item is: </b>$priority<br/>\n");<br>iwpt_output ("<b>The item is: </b>$status<br/>\n");<br>}<br>}<br>[/html]I either get 1) the html code with empty iw values or 2) a Preview and Generate Error - Could not load dcr: y:/default/main/branch1/WORKAREA/branch1/templatedata/common_indexT/highlights/presentation/101310_sdi
...my %dcrHash;foreach my $nextdcr (@full_dcr_names) { my $dcrpath = "$path$nextdcr"; my $lastmod = -M "$dcrpath"; push(@{$dcrHash{$lastmod}}, $nextdcr);}foreach my $key (sort keys %dcrHash) { foreach my $dcrfile (sort @{$dcrHash{$key}}) { #... $dcrfile is what you want to load }}