SilverStripe 2.2 will automatically place unobtrusive icons next to text links that go to files, like Word Documents and PDF's.

Just add a link in the editor, and if it recognises the type of the file, an icon is automatically added. This helps visitors on websites make better choices when navigating your site.

We're making use of a CSS technique demonstrated by Eric Meyer at his AnEventApart conference in San Francisco last month:

.typography a[href$=".PDF"] {
 padding: 2px;
 padding-left: 20px;
 background: url(../images/icons/page_white_acrobat.png)
left center no-repeat;

This CSS technique (Attribute selectors) works in Safari, Firefox, and Internet Explorer 7. Thanks Sean for contributing this!

Post your comment

Comments for this post are now closed.

Comments

RSS

i think it would: http://tinyurl.com/2um2na

Posted on 13 Nov 2007 by xeraa

these wouldn't validate would they ?

Posted on 13 Nov 2007 by Simon

Yes Colin you're right. but it's a nice touch anyway :).

Posted on 10 Nov 2007 by CoolGoose

Yes, we've simply added blocks of CSS identical to the example above, and added some icons, to the BlackCandy theme that will be released in SilverStripe 2.2. A nice, easy enhancement :)

Posted on 9 Nov 2007 by Sigurd Magnusson

This is a function of theme styling, not a CMS feature, right?

Posted on 9 Nov 2007 by Colin