[TYPO3-dev] typolink - link to records 2

Daniel Pötzinger operation-lan at gmx.de
Thu Oct 4 20:06:14 CEST 2007


Ernesto Baschny [cron IT] schrieb:
> Daniel Pötzinger wrote: on 04.10.2007 19:06:
> 
>>> Definitively! I had just a quick look in the source code. Maybe we could
>>> simplify the "browse_links" additions so instead of having "tabs" we
>>> could use the "Pages" tab and simply list records from other tables
>>> instead of just tt_content in the already present "list view". So if
>>> tt_news records are "linkeable", simply show them in the list view
>>> together with the tt_content elements which already do something
>>> different (adds an anchor to the target URL).
>>>
>>> The tab name could then be renamed to "Pages / Records".
>>>
>>> What do you think?
> 
>> I definitly like it more to have the option to configure additional tabs.
>> Like you see in the example you can configure a tab which is called
>> "News" and where you only see the sysfolder with news.
>> That is really nice to teach to an editor: "If you want to link to a
>> news - just select "News" Tab and select your newsitem"
>>
>> The behaviour of "page" tab now is that if you click on a page directly
>> the link is generated. Its even more difficult to tell an editor to
>> first click on that little ">" icon right to the page and then select
>> your record.
> 
> True stuff... And this is a matter for the HCI team anyway! ;)
> 
> So why is the RTE browse_links different from the "standard" one? I
> haven't really looked into this, but do you know the reasoning for this
> being separate? Is the API different? Aren't the requirements the same?
> 
Don't know exactly what you mean, but I can explain what I did.

I add a hook in class.browse_links.php and 
class.tx_rtehtmlarea_browse_links.php. In both classes the hook is 
implemented in the same way. (a internal array with hookobjets is 
initialised, and several functions in this hookobjects are called in 
diffrent functions of the browse_links class)

The reason why both classes needs to be adjusted is:
class.browse_links.php
is used by the normal link wizard (e.g. if you have a TCA link field)

class.tx_rtehtmlarea_browse_links.php extends browse_links.php and is 
only used in links called from the RTE htmlarea. Therefore tho hook is 
also implemented there.

(Finaly the extension linkHandler registers as a hook and adds the Tabs)

Was this your question?




More information about the TYPO3-dev mailing list