<?php $condition[] = intval(file_exists($output)); ?>
[[fileexists:is=`assets/path/to/file.pdf`:then=`Yes`:else=`No`]]
This question has been answered by BobRay. See the first response.
[[!FileExists? &file=`path/to/file`]]
/* FileExists snippet */
$path = $modx->getOption('file', $scriptProperties, '');
return file_exists($path)? 'Your Text Here' : '';[[!FileExists? &file=`[[++assets_path]]path/to/file`]]
[[*id:fileexists=`…`:then=`…`]]
[[!FileExists? &file=`path/to/file`]]
/* FileExists snippet */
$path = $modx->getOption('file', $scriptProperties, '');
return file_exists($path)? 'Your Text Here' : '';[[!FileExists? &file=`assets/documents/member-details/[[+memberId]]_[[+firstName]]-[[+lastName]]_Profile.pdf`]]
<?php
/* FileExists snippet */
$path = $modx->getOption('file', $scriptProperties, '');
return file_exists($path)? '<p>View or download [[+firstName]]\'s profile as a <a href="assets/documents/member-details/[[+memberId]]_[[+firstName]]-[[+lastName]]_Profile.pdf">PDF</a></p>' : '<p>[[+firstName]] [[+lastName]] does not have a profile available at present.</p>';