Ok, I’m using the modX CMS on lots of sites now. I love it. Its groovy.
I have a little issues that I’d like sorted though. For each news item, I’m using a template (with Template Variables) which spits out the headline, then the date, then the content, and then any file thats been uploaded with the story (a newsletter for example).
The problem I have is, when the user doesn’t upload any file, it still adds a little download icon (which I have added to the tag with a background image in the CSS). I was wondering if there was a nice little script I could add which removed the icon if no content was uploaded.
So if there is an upload, the markup is something like:
<a href="linktouploadedfile.pdf" class="download">Name of uploaded file</a>
and if there is no file uploaded, the code would be:
<a href="" class="download"></a>
So I guess if thats the case, I just want to remove the whole link, or just have it remove the background image.
Any ideas?
Thank you