[TYPO3-dev] link doesn't support 2 classes

Christopher Torgalson bedlamhotel at gmail.com
Wed Mar 4 01:33:28 CET 2009


Hi,

On Tue, Mar 3, 2009 at 4:52 AM, Thomas Allmer <at at delusionworld.com> wrote:
> This is a copy from the rte list, I just thought it might also interest
> people here...
>
> hey,
>
> I just found out that if you create something like this in an rte[1]
> <a href="..." class="first second">...</a>
>
> after save it will be transformed to
> <a href="..." class="first" title="second">...</a>
>
> for <p class="first second">...</p> it works, but for link it doesn't
> work...
>
> More UseCases:
>
> in RTE:
> <a class="first second" href="22">normal</a>
>
> <a class="first second" href="22" style="padding: 5px;">with style</a>
>
> <a class="first second" href="22" lang="de">with lang</a>
>
> transformed to:
> <a class="first" title="second" href="22">normal</a>
>
> <span style="padding: 5px;"><a class="first" title="second"
> href="22">with style</a></span>
>
> <a class="first second" lang="de" href="22">with lang</a>
>
> in DB:
> <link 22 - first second>normal</link>
>
> <span style="padding: 5px;"><link 22 - first second>with style</link></span>
>
> <a class="first second" lang="de" href="22">with lang</a>
>
> Conclusion:
> so it's kinda strange that I need to add something like 'lang="de"' to
> make it work.
>
> It's pretty nasty that the typo3 link doesn't support 2 classes....
>
> I think I could "hack" it for tinymce_rte as it already XCLASS
> class.t3lib_parsehtml_proc.php and post modify links who are valid TYPO3
> pages.
>
> However is there a nicer way to do it? Like just setting an option that
> links should always be saved as html and not as TYPO3 link?
>
> Any suggestions? don't need a working solution (although it would be
> easier) but what do you think about this restriction in the TYPO3 link?


This isn't a solution to your problem, but I just wanted to point out
that what you're describing is almost certainly the by-design
behaviour of the .typolink funtion--read the 'parameter' section in
the TSref [1].

-- 
Christopher Torgalson
http://www.typo3apprentice.com/

[1] http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4174763




More information about the TYPO3-dev mailing list