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

Benoit Dutilleul benoit.dutilleul at googlemail.com
Thu Aug 9 09:17:31 CDT 2007


2007/8/9, Patrick R. Michaud <pmichaud at pobox.com>:
>
> On Wed, Aug 08, 2007 at 04:01:31PM -0500, Ben Stallings wrote:
> > Hello again.  I'm trying to do something that ought to be simple, but
> > I'm not sure how to go about it...
> >
> > 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.
>
> Perhaps hide the link using css?
>
>     .fpltemplate .createlinktext { display:none; }
>     .fpltemplate .createlink { display:none; }
>
> This suppresses the display of all "create link" elements within
> the output of a pagelist template.
>
> We could also see about adding a condition to test for the
> existence of an attachment.


Dear Patrick, dear community,

Such a conditional would be useful to me :=)
Kind regards,

Benoit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070809/e97819c3/attachment.html 


More information about the pmwiki-users mailing list