I've been attempting for a coupole of weeks now to pull together a presentation template that will pull a list of file names from a directory (the name of the directory specified in the DCR), and then use the list to create a listing of file names that are linked to the correct files.
There actually was an example of this in my TeamSite Advanced Templating class, but since I took it a number of years ago, I'm having no success in finding the example (Intewoven support says the files are confidential). The example is alluded to on pages AD-56 and 57 of the Advanced Teamsite 4.5 Templating workbook.
So, wotout any example, I've been trying to piece together something that will work. I only have a very elementary knowledge of Perl (likely will have a lot more by the time this is done).
I'm getting a XML parse error now...
ML parse error:
undefined entity at line 46, column 5, byte 1722 at

\PROGRA~1\INTERW~1\TeamSite\iw-perl\vendor\lib/XML/Parser.pm line 187
Here's my code at the point I'm at now:
<iw_perl>
<![CDATA[
my $directory = iwpt_dcr_value('dcr.directoryname');
my $dir = '/webapp/wcs/stores/StatesNet/sscinfo/promo/promo_docs/direct_mail/$directory';
my $ptdir = '/iw-home/default/main/StatesNet50/promo/jsp_files/promo/promo_docs/direct_mail/$directory';
# I set up three variables becasue there needs to be a different file path in order to read the directory through TeamSite Forms then to create a link for the web server
opendir(DIR, "$ptdir") or die "could not open $ptdir";
my
@pdfFiles = grep(/\.pdf$/,readdir(DIR));
closedir(DIR);
]]>
</iw_perl>
<iw_iterate var='file_name' list='(
@pdfiles)'>
<![CDATA[<li><a href="{iw_value name='$dir'/}/{iw_value name='file_name'/}
">{iw_value name='file_name'/}</a><br />]]>
</iw_iterate>
#attempting to read each file name of the type .pdf, iterate through the list, and use the variables to write in both a link and the name of the file for the link name
I'm at a loss at the moment. Any ideas on what I can try now?
-Liz