Showing PDF icon and file size when linking

Hi all,


When you link to an asset (in this case, a PDF) from a normal content div as part of a standard page using the WYSIWYG interface, how do you get a PDF icon and the file size to show with the link? I searched around the forum but could only see descriptions on how to do this using an asset listing.



Is it possible?



EDIT: I did try %globals_asset_file_size_readable:2247% but it didn't show the size, just printed on the front end.

What version are you running? %globals_asset_file_size_readable:2247% is fairly new.


Also, for the icon, you could just attach it via CSS.

We're on 3.16.0.


I thought about css and making a 'pdf' class, but when there didn't seem to be a way to add a class in the link box I thought maybe there was another better method.

Something like this would work, in most browsers bar IE6. There may be a JavaScript solution to get IE6 to play nice as well.

Fascinating page Daniel! That would certainly solve half the problem. :slight_smile:


As for the other half, I can see from the website that 3.16.0 doesn't support global keywords. Hopefully we will go up a version or two soon.



Thanks for the input everyone!

[quote]Fascinating page Daniel! That would certainly solve half the problem. :slight_smile:


As for the other half, I can see from the website that 3.16.0 doesn't support global keywords. Hopefully we will go up a version or two soon.



Thanks for the input everyone![/quote]



If you want to find all PDF links and apply a new class, jQuery comes with a good solution (work both in MSIE6 and other browsers…)

    

Thanks! :slight_smile: