Feature #19465
closedEpic #65814: Make Indexed search extbase plugin shine
Configuration enhancement for indexed_search
100%
Description
This was not possible with actual version of indexed_search because
- templating was not consequent, there were still hardcoded HTML-output
- pagebrowser was not configurable and not templated
- complete search result was not configurable
Also it was not possible to split the output and display in different parts of the page. I added a new plugin which uses indexed_search in a special way using only the form, so search is't done multiple times. The new plugin is a virtual one that calls indexed_search with a special configuration, which can be used with Typoscript or as Content Element on page.
I added flexforms to both plugins so it is possible to use indexed_search without additional Typoscript.
Here is an overview of the implemented changes. I configured them to the default output which is the same as actual,the only change of defaults are
- link for extended Searchform set to 0
- standard template is the CSS-version
- css-template has new sections: browsebox top, browsebox bottom, main tamplate for search results
CHANGE OF FUNCTIONALITY:
none
CHANGE OF CONFIGURATION:
A new plugin was added: Searchbox for indexed search.
This makes it possible to use it also as a global searchbox on the site. There is no more need to use an extra plugin like macina search or creating a form by yourself.
This is how it's done in Typoscript:
plugin.tx_indexedsearchbox < plugin.tx_indexedsearch
plugin.tx_indexedsearchbox.code = form
following Typoscript-vars are added
#the target page for the searchform where are the results displayedresultPid =
#what to display
code = form,rules,results
- Display the searchword in results, like: Search for "searchword"
whatIs_stdWrap {
wrap = <div class="tx-indexedsearch-whatis">|</div>
}
searchWord_stdWrap {
wrap = <span class="tx-indexedsearch-sw">"|"</span>
}
- Paging
defaultResultsProPage = 10
pageBrowser {
doNotLinkCurrent = 1
general_stdWrap {
wrap = <ul class="browsebox">|</ul>
}
previous_stdWrap {
wrap = <li>|</li>
}
next_stdWrap {
wrap = <li>|</li>
}
pages_stdWrap {
wrap = <li>|</li>
}
current_stdWrap {
wrap = <li class="tx-indexedsearch-browselist-currentPage"><strong>|</strong></li>
}
pageLinks_stdWrap {
preCObject = TEXT
preCObject.dataWrap = {LLL:EXT:indexed_search/pi/locallang.xml:pi_list_browseresults_page}
preCObject.noTrimWrap = | ||
}
}
3 sections are added
- section for top browsebox
- section for bottom browsebox
- section for the complete results output
Remember when change settings in typoscript of plugin.tx_indexedsearch to repeat the copy for this plugin.
I tried to describe the patch in detail so please test it, i hope you enjoy the enhancement.
(issue imported from #M9574)
Files
Updated by Steffen Kamper over 16 years ago
for easy testing i uploaded the complete extension
Updated by Daniel Sasjadvolk almost 16 years ago
Nothing found after login...
Without being logged in, indexed_search works perfectly. After the login, no searchresults...
Installed Versions.
typo3 4.2.6
sr_feuser_register 2.5.19
fe_login 1.0
indexed_search 2.11.999 (got it from Steffen Kampers http://bugs.typo3.org/view.php?id=9574)
macina_searchbox 2.2.0
I also tried it with the crawler-Extension, added the necessary ID's - But it didn't work.
Anyone got an idea?
Updated by Patrick Gaumond over 15 years ago
While having this big patch with new configurations, would it be possible to add http://bugs.typo3.org/view.php?id=11706 which brings TS prefs for those:
summaryMax=300
postPreLgd=60
postPreLgd_offset=6
divider= ...
V5 is in Corelist but there was performance improvements by Ruppi after this one...
Updated by Steffen Kamper over 15 years ago
unfortunally there was no review until feature freeze, so this patch has only chance for 4.4. Sad ...
Updated by Ralf Hettinger over 15 years ago
While I appreciate the much greater flexibility which would be introduced by this patch, I'd think that it might be a good idea to add some "backwards compatibility care pack" to avoid breaking indexed_search after updating within installations that use their "own" templateFile. This own templateFile wouldn't contain the new subparts and therefore indexed_search would output nothing at all after an update (subpart ###SEARCH_RESULTS### missing).
As far as I can see, the following subparts would require a fallback:
###SEARCH_FORM_HIDDEN###, ###BROWSE_BOX_TOP###, ###BROWSE_BOX_BOTTOM###, ###SEARCH_RESULTS###, ###SEARCH_NO_RESULTS###
How about putting these subparts into separate fallback template files shipped with indexed_search, then within the pi-class, check for existance of these subparts (in the TS .templateFile given template) and if not found there, load them from the fallback? 5 additional ifs should do no (more) harm to indexed_search regarding the performance.
Updated by Ralf Hettinger over 15 years ago
Added _v7 (based on latest patch _v6 from core list, for TYPO3 4.3 only).
There are some more configuration options, the default settings are set so that nothing is different from the current version of indexed_search (but of course more configurable)
new TS configuration:
- TS options to configure what is shown within the resultlist (thus related to #20421) [plugin.tx_indexedsearch.show.results.]
resultList = [boolean, default 1]
resultBrowserTop = [boolean, default 1]
resultBrowserBottom = [boolean, default 1]
- TS option to disable link in section titles (related to #16794) [plugin.tx_indexedsearch.]
linkSectionTitles = [boolean, default 1]
- TS option to wrap result list (related to #16386) [plugin.tx_indexedsearch.]
listcontent_stdWrap [->stdWrap, default: listcontent_stdWrap.wrap = |]
- integrated #14902, since it is partially solved anyways here. Corresponding new TS options [plugin.tx_indexedsearch.pageBrowser.]
makePointerLinksWithHref = [boolean, default 0] @Steffen: please test, if this is still compatible to your version, since #14902 supposes to add search settings as get params, which is now included
makePointerLinksWithHref.ATagParams = class="tx-indexedsearch-pointerLink"
makePointerLinksWithForm = 0
makePointerLinksWithForm.submit_params = class="tx-indexedsearch-pointerButton"
- solved #20875, new TS options [plugin.tx_indexedsearch.results.]
summaryCropAfter = [int, default 50]
summaryCropSignifier = [string, default emtpy]
titleCropAfter = [int, default 180]
titleCropSignifier = [string default '...']
markupSW_summaryMax = [int, default 300]
markupSW_postPreLgd = [int, default 60]
markupSW_postPreLgd_offset = [int, default 5]
markupSW_divider = [string, default empty]
- TS option to enable no_cache when forwarding search words in result links [plugin.tx_indexedsearch.]
forwardSearchWordsInResultLink_no_cache = [boolean, default 1]
Furthermore:
- Additional HTML marker ###CSSCLASS_EVEN_ODD### for alternating result rows
- Additional variable stored to register: $GLOBALS['TSFE']->register['indexed_search_RESULTCOUNT'] (may be used for TS wrappings using data = register:indexed_search_RESULTCOUNT)
Finally, there has been done some slight clean up compared to _v6 from core list.
Updated by Dmitry Dulepov almost 15 years ago
This huge patch has top be split into many smaller patches. Remember: a single issue per patch is allowed by commit rules!
Updated by Ralf Hettinger almost 15 years ago
Hm. Then this one might be treated as sort of a collective storyboard for improving the templating of indexed_search...
Dmitry, are you into solving/reviewing some of the issues collected here? Let me know, we could easily split up the collection that we have here into smaller chunks.
Only that Steffen's initial templating patch is sort of huge for itself... and I wouldn't want to split this one up - that's been the reason why I hooked in here - probably I shouldn't have.
Updated by Armin Guenther over 14 years ago
Great enhancement - thanks! Would like to see it implemented soon.
Updated by Xavier Perseguers over 13 years ago
- Target version changed from 4.6.0 to 4.6.0-beta1
Updated by Xavier Perseguers over 13 years ago
- Target version deleted (
4.6.0-beta1)
Updated by Xavier Perseguers about 13 years ago
- Assignee deleted (
Steffen Kamper)
Updated by Tymoteusz Motylewski over 8 years ago
- Status changed from Accepted to Closed