[pmwiki-users] how to hide upload links for nonexistent attachments

Petko Yotov 5ko at free.fr
Wed Aug 8 19:12:39 CDT 2007


On Wednesday 08 August 2007, Ben Stallings wrote:
> I'm writing a pagelist template and want to display an image whose name
> matches the name of the listed page if that image exists, and not
> display anything at all if the image doesn't exist.  But
> Attach:{=$Name}.jpg and (:thumb {=$Name}.jpg:) both display an upload
> link if the file doesn't exist.

If you are using the ThumbList recipe and not ThumbnailLinkToImage, for the 
(:thumb:) command:

   $ThumbAttachLinks=0;
   // and eventually
   $ThumbShowErrors=0;

Note that for a remote page you will probably need to do 
   (:thumb "{=$FullName}/{=$Name}.jpg":)

Thanks,
Petko




More information about the pmwiki-users mailing list