See below. The critical part is where the variables $filetofind1 etc. need to include the value of #_ATT{Race}
[events_list year=”<?php echo $year; ?>”]
<div style=”float:left; clear:both; min-height:32px; border-top: 1px solid rgb(37, 129, 170); width:100%;”>
<div style=”float:left; width:210px;”>
<div style=”float:left; width:30px; text-align:left; padding-right:10px;”>
#_ATT{Race} </div>
<div style=”float:left; width:170px; clear:none;”>
#_EVENTDATES #_24HSTARTTIME</div>
</div>
<div style=”float:left; clear:none;”>
#_EVENTNAME
{is_future}<i>#_ATTENDEESPENDINGLIST</i>{/is_future}
</div>
<?php
// $filetofind1 = “wp-content/files/event-reports/”. $year . “-“. . “.pdf”;
// $filetofind2 = “wp-content/files/event-results/”. $year . “-“. “.pdf”;
// $filetofind3 = “wp-content/files/event-instructions/”. $year . “-” . “.pdf”;
echo “Race No. as variable” . $EM_Event->output(‘#_ATT{Race}’);
if (file_exists($filetofind1) || file_exists($filetofind2) || file_exists($filetofind3)) {
?>
<div style=”float:right; width:200px;”>
<div style=”float:right; width:50px; clear:none; text-align:right;”>
<?php
if (file_exists($filetofind1)){ ?>” target=”_blank”>
<?php };
?>
</div>
<div style=”float:right; width:50px; clear:none; text-align:right;”>
<?php
if (file_exists($filetofind2)){ ?>” target=”_blank”>
<?php } else {echo ” “;};?>
</div>
<div style=”float:right; width:50px; clear:none; text-align:right;”>
<?php
if (file_exists($filetofind3)){ ?>” target=”_blank”>
<?php } else {echo ” “;};?>
</div>
</div>
<?php }?>
<?php
?>
[/events_list]