MFEMH
MFEMH

Reputation: 23

Why does indexed_search don't work only on sub-pages in TYPO3 8 / 9?

I need your help. I've a TYPO3-installation (version 8.7.24) with 8 different websites in my tree. Now I want to install and configure "indexed_search" for every sub-page. The index is ok and works.

My page-tree:

- root-page (PID: 1)
-- sub-page-tree 1 (PID: 179)
-- sub-page-tree 2 (PID: 146)
-- sub-page-tree 3 (PID: 502)
-- sub-page-tree ... up to 8

Now I want to search on every single sub-page-tree as it's own.

When I set the "plugin.tx_indexedsearch.settings.rootPidList = 1", the search-form works, but it show every result from every other sub-page-tree. But when I set the "rootPidList = 179", I don't get any results. I've tried it on another website with TYPO3 v9.5.5 and there's the same problem.

Do you know where the problem could be?

Upvotes: 2

Views: 532

Answers (1)

UnpassableWizard
UnpassableWizard

Reputation: 1279

Below 621 is the root-id for instance, I saw this trick on this site.

For the author of the article it's not clear why this setting does NOT work:

plugin.tx_indexedsearch.settings.rootPidList = 621

But he had success with this setup:

plugin.tx_indexedsearch {
   _DEFAULT_PI_VARS.sections=rl621_621
   search {
      rootPidList = -1
   }
}

The variable rl621_621 (rl stands for „RootLevel“), it's used for replacing the marker ###SECTIONS### in the search template:

<input type="hidden" name="tx_indexedsearch[_sections]" value="###SECTIONS###">

Sidenote: On the linked page the input-field is really hidden, as the brackets are not replaced by htmlentities, even it should as the html should be visible as part of the article.

Upvotes: 2

Related Questions