[TYPO3-english] Adjusting the page title used by indexed_search

gencha kinggencha at googlemail.com
Thu Aug 25 21:58:15 CEST 2011


Hi Jan,

this doesn't work with indexed_search. indexed_search doesn't care
about the <title> defined in the HTML output. In fact, it never sees
any of the generated HTML output. So anything I adjust there has no
effect on my index. The only way around that is to index your own site
as an external source. Then indexed_search will read the actual HTML
output.

Until recently I was not aware how indexed_search actually generates
the index. It registers a hook in the page generator. So when you open
a page on your frontend, that hook gets called and indexed_search
retrieves the page object from the database. It will then build the
context from that object. That object also contains the title of the
page. And that will be used no matter what the actual <title> tag in the
HTML output would be.

So, yeah... :)

On 2011-08-25 15:40, Jan Bednarik wrote:
> Hi,
>
> it made me think ;)
>
> You can adjust page title by using userFunc on it (see TSRef), this way
> you could alter the title that would be then used in indexed search.
>
> In order to return the original title, you could use
>
> config.noPageTitle = 1
>
> and then supply title like this:
>
> page.headerData.123 = TEXT
> page.headerData.123 {
> wrap = <title>|</title>
> value = ...
> }
>
> Jan
>
> Dne 24.8.2011 15:04, Oliver Salzburg napsal(a):
>> How can I modify the page title that will be used by indexed_search?
>>
>> I've currently commented out the use of indexedDocTitle in the indexer
>> completely because I was unable to find any point where I would able to
>> adjust it's value.



More information about the TYPO3-english mailing list