[TYPO3-english] R: Automatically add accessability icon toexternal links
De Contardi Riccardo
Riccardo.DeContardi at bhuman.it
Fri Feb 25 15:27:21 CET 2011
If you use TYPO3 4.3+ , you can also use
page.cssInline, which is a CARRAY, so you can write
page.cssInline{
10=TEXT
10.value(
#main p a[href^="http://"] {
background: url("icon.gif") no-repeat scroll 0 2px transparent;
padding-left: 13px;
}
#main p a[href^="{$baseURL}"] {
background: none;
padding-left: 0;
}
)
}
PROS: the CSS is included in an external temporary file
BTW: Check also this
http://nicolasgallagher.com/css-background-image-hacks/
Best regards
--------------------------------------------
Riccardo De Contardi - Web Developer
B Human Srl - www.bhuman.it
Via Canzio, 15 - 20131 Milano
TEL +39-02-20.23.271 - FAX +39-02-20.240.561
--------------------------------------------
-----Messaggio originale-----
Da: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-bounces at lists.typo3.org] Per conto di Stefan Isak
Inviato: venerdì 25 febbraio 2011 14:32
A: TYPO3 English
Oggetto: Re: [TYPO3-english] Automatically add accessability icon toexternal links
Oh, that's right. Never thought about that in this case.
Works like charm.
I used page.headerData for once to have access to baseUrl property.
So that's my solution now:
page.headerData.1001 = HTML
page.headerData.1001.value (
<style type="text/css">
#main p a[href^="http://"] {
background: url("icon.gif") no-repeat scroll 0 2px transparent;
padding-left: 13px;
}
#main p a[href^="{$baseURL}"] {
background: none;
padding-left: 0;
}
</style>
)
Thanks!
On Feb 25, 2011, at 11:18 AM, Kay Strobach wrote:
> Hi Stefan,
>
> you can do it with css by cehcking the href attribute ;)
>
> http://www.w3.org/TR/CSS2/selector.html#attribute-selectors
> http://webdesignblog.de/webdesign/nutzen-des-attribute-selector-mit-cs
> s/
>
> Regards
> Kay
>
> Am 25.02.2011 11:06, schrieb Stefan Isak:
>> Hi,
>>
>> is there somehow a chance to automatically add a class like external-link-new-window to every external link, so that it's not necessary anymore to update every link in RTE manually.
>> Maybe there's a setting in RTE parse func? I can't find any information about it.
>>
>> Thanks a lot.
>> Cheers
>> Stefan
>>
>
>
> --
> http://www.kay-strobach.de - Open Source Rocks
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
**************************************************
Chi riceve il presente messaggio e' tenuto a verificare se lo stesso non gli sia pervenuto per errore. In tal caso e' pregato di avvisare immediatamente il mittente e, tenuto conto delle responsabilita connesse all'indebito utilizzo e/o divulgazione del messaggio e/o delle informazioni in esso contenute, voglia cancellare l'originale e distruggere le varie copie o stampe.
The receiver of this message is required to check if he/she has received it erroneously. If so, the receiver is requested to immediately inform the sender and - in consideration of the responsibilities arising from undue use and/or disclosure of the message and/or the information contained therein - destroy the original message and any copy or printout thereof.
More information about the TYPO3-english
mailing list