[TYPO3-english] Fileicons for PDF, JPEG, PNG, and so on
Martin Mädler
martin.maedler at rwth-aachen.de
Wed Dec 21 16:13:58 CET 2011
Hi Sergio,
you cand achieve the desired effect via a CSS rule.
something like this (all anchors where the attribute value of href ends
with ".pdf"):
a[href$=".pdf"] {
background: url("./images/pdf_icon.gif") no-repeat scroll right
center transparent;
padding-right: 18px;
}
Wikipedia does it in a simliar way to indicate external links (absolute
links):
a[href^="http://"]{
background:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFZJREFUeF59z4EJADEIQ1F36k7u5E7ZKXeUQPACJ3wK7UNokVxVk9kHnQH7bY9hbDyDhNXgjpRLqFlo4M2GgfyJHhjq8V4agfrgPQX3JtJQGbofmCHgA/nAKks+JAjFAAAAAElFTkSuQmCC")
no-repeat scroll right center transparent;
padding-right: 13px;
}
-Martin
Am 21.12.2011 15:28, schrieb Sergio:
> Hi all,
>
> would you know how to add automatically a fileicon next to every file I add
> to the frontend (PDF, JPEG, and so on) to download? If TYPO3 base doesn't
> do it directly, would you know some extension? It's something like tt_news
> does with links on every news, but applied to any element content.
>
> Thanks in advance,
> Sergio
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
More information about the TYPO3-english
mailing list