[TYPO3-dev] indexed_search: speaking links in results when using domain records

Lorenz Ulrich lorenz-typo3 at visol.ch
Tue Jan 11 19:33:22 CET 2011


Hi everyone

I'm working with a bigger TYPO3 installation that contains ~15 websites 
with individual domains. Every website has at least one domain record.

To be able to link properly between this domains, the Typoscript option

config.typolinkEnableLinksAcrossDomains = 1
(introduced in 4.2)

is set.

RealURL works fine for speaking links also between domains. As search 
engine we're using indexed_search.

indexed_search is obviously counting the domain records and if domain 
records are used links to pages are treated as "external" links.

(See typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php, function 
linkPage)

The problem is that external links are then constructed "manually" 
(return '<a 
href="'.htmlspecialchars($scheme.$firstDom.'/index.php?id='.$id.$addParams).'"'.$target.'>'.htmlspecialchars($str).'</a>';)
and therefore no speaking links are being generated.

Since we have config.typolinkEnableLinksAcrossDomains property, I'm 
quite sure that this is unnecessary. With this property, typolink can 
handle links between domain records correctly and so this special 
treatment does nothing more than prevent us from having beautiful links :).

I attached a "patch" against trunk only for research purposes... in my 
enviromnent commenting out this special treatment stuff does the trick. 
Links to internal pages, across domains or not, even links to 
mountpoints, work fine.

I would really appreciate if some other users of indexed_search and 
domain records could let me know how they are handling this "problem".


Thanks a lot,


Lorenz


More information about the TYPO3-dev mailing list