[TYPO3-dev] typolink - link to records 2

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Oct 4 15:10:44 CEST 2007


Daniel Pötzinger wrote: on 04.10.2007 12:24:

>> good point.
>> The links are configured with typoscript, so you are able to use if
>> checks for the pid to have diffrent singleview pages.
>>
>> I will prepare an example - but it should be possible with the current
>> concept.
> 
> Not tested but something like this should work then.
> Because the typolink-object has the linked record as content-array:
> 
> plugin.tx_linkhandler {
>     //configure links for tt_news records:
>     tt_news {
>         //singleview page depends on storage location of the tt_news item
>             parameter.case {
>         key.field=pid
>         12={$linkhandler.newsSinglePidForStoragePage12}
>         default={$linkhandler.newsSinglePid}
>         }
>             additionalParams=&tx_ttnews[tt_news]={field:uid}
>             additionalParams.insertData=1
>     }
> }

That is some awesome stuff which is on a "wishlist" of most TYPO3 users
out there. Now just integrate that with RTE browse_links and it will
make a "dream come true" to many TYPO3 site admins. :)

About the "configurability", I would propose not having to "configure"
much stuff in TypoScript, but let the extension that is offering single
views do the job. For example tt_news can have various ways of linking
to a single record. Why not give that job to tt_news as it is already
doing that? Why would I need to configure: tt_news + all "other" single
links to tt_news separately?

For example in tt_news I can configure that the PID of a single view of
a tt_news article comes from first category's record (field "single view
page"). There would be no way to "map" this kind of stuff in TypoScript
without some very complex syntax. Or imagine one domain linking to
tt_news records on another domain. We need even to load TypoScript from
the "other" site to be able to know how to link to that article. That
should be tt_news' job, not the admins.

So I would propose to have a hook where each extension can "generate the
link" it finds appropriate for a given record-uid. This could depend on
the storage-pid, on the current rootline, maybe even on other bizarre
factors we don't know (and don't care) about.

Cheers,
Ernesto




More information about the TYPO3-dev mailing list