[TYPO3] indexed_search results using subtitle
Martin Bidner
martin at bidner.com
Sat Oct 21 21:25:08 CEST 2006
o.k. i did same testing in class.tx_indexedsearch.php
i found there the function called makeTitle($row):
//in line 2046:
function makeTitle($row){
$add = '';
if ($this->multiplePagesType($row['item_type'])) {
$dat = unserialize($row['cHashParams']);
$pp = explode('-',$dat['key']);
if ($pp[0]!=$pp[1]) {
$add=', '.$this->pi_getLL('word_pages').' '.$dat['key'];
} else $add=', '.$this->pi_getLL('word_page').' '.$pp[0];
}
// ##### THIS LINE SOUND INTERESSTING:
$outputString =
$GLOBALS['TSFE']->csConvObj->crop('utf-8',$row['item_title'],50,'...');
// ###### I DID THIS FOR TESTING:
$outputString = "ein anderer titel";
return $this->utf8_to_currentCharset($outputString).$add;
}
as result all my results got "ein anderer titel" as title wich was
expecting, but now, very strange:
// ###### I DID THIS FOR TESTING:
//$outputString = "ein anderer titel";
AND
// ##### THIS LINE SOUND INTERESSTING:
$outputString =
$GLOBALS['TSFE']->csConvObj->crop('utf-8',$row['item_subtitle'],50,'...');
OR
// ##### THIS LINE SOUND INTERESSTING:
$outputString =
$GLOBALS['TSFE']->csConvObj->crop('utf-8',$row['realynothingblablabla'],50,'...');
makes me still display the pages title
'*+*-01
this is what i ment with
(easy means i?m not very firm in php-coding)
greets
martin
Martin Bidner schrieb:
> thanx first
> sounds a bit confusing to me -
> you think about codechangings in
>
> "...probably one of the page post-processing "
> class.tx_indexedsearch.php
> (i think this is where the output is created)
>
>
> thank you
> martin
>
> Martin Kutschker schrieb:
>> Martin Bidner schrieb:
>>>
>>> is there an "easy" way to use pages-subtitle instad of title
>>> in search results of indexed_search
>>>
>>> (easy means i?m not very firm in php-coding)
>>
>> But IMHO you will need some coding. You can set the page title which
>> the indexer uses from PHP. So basically all you need is to set this
>> title yourself. The best place is probably one of the page
>> post-processing hooks. I think there is also a hook for indexing, but
>> I don't know if it's called before the page is passed to the indexer.
>>
>> Masi
More information about the TYPO3-english
mailing list