How does one correctly set the target page of indexed search results in typo3?
search, typo3, typoscript
Solution
plugin.tx_indexedsearch {
search {
targetPid >
targetPid = 123
}
}
Reference: http://lists.typo3.org/pipermail/typo3-team-core/2010-March/036269.html
Experience: works even in TYPO3 version 6.x.
Default setting for plugin.tx_indexedsearch.search.targetPid is:
plugin.tx_indexedsearch {
search {
# TSFE:id is always the current page
targetPid.data = TSFE:id
}
}
Problem
I am working with typo3 4.7 and trying to redirect the search results of the indexed search plugin to a page in my site and managed to stumble upon the constants editor where I've managed to use it to guide me in setting up the object. Below is the current typoscript of the object in my root template (mapped into a TV template): ``` # --- SEARCHBOX OBJECT ---------------------------------- lib.searchbox < plugin.tx_indexedsearch lib.searchbox{ #Disable the advanced search link show.advancedSearchLink = 0 show.rules = 0 show.alwaysShowPageLinks = 1 #pid of root page is 1 and pid of the search result page is 9 search.rootPidList = 1 search.targetPid = 1 view.defaultPid = 9 result_link_target = 9 } ``` Thus far I have been unsuccessful in my attempts and all results are displayed in the page in where the search was performed. I would also like to know if it is possible to modify the displayed search box so that only the search field is displayed. Thanks for your time. Edit: I have installed and I'm trying out solr, if anyone has any experience with it pls feel free to help resolve this issue. My two problems with solr so far is that whilst search does re-direct to the right page, (1) the search box is way too big so I need to be able to modify the display of this box (to remove the button and reduce the size) (2) it spouts som e messages about search rules and returns nothing so far. Edit 2: Seems solr is the way forward. I have managed to get everything I want done except the result output. I lost a few days (5) before realising that the tomcat container was bound to an ipv6 protocol interface. Resolving that (see here for those who may stumble upon the same problem for how to resolve this) has meant I can now remotely admin the solr server for more information. The pages are being indexed (Not regularly as specified in the scheduler) but I still get no results on the result page, and devlog only returns warning about there not being typo3 search markers despite my TV templates being peppered with them. I can only guess that maybe I'm to mark the results page with some type of marker to get the results to show at this point.