[TYPO3-core] RFC: #9574: Configuration enhancement for indexed_search

Steffen Kamper info at sk-typo3.de
Thu Oct 16 10:11:45 CEST 2008


Hi,

this is a SVN patch request.

Type: Feature (Enhancement)

Bugtracker references:
http://bugs.typo3.org/view.php?id=9574

Branches: trunk

Problem:
For a client project i needed some more advanced Configuration of the 
output of indexed_search.
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 displayed
resultPid =
#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 = | ||
	}
}

CHANGE IN TEMPLATE
3 sections are added
* section for top browsebox
* section for bottom browsebox
* section for the complete results output

Additional:
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.

vg Steffen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: indexed_search_pluginconfiguration.diff
Type: text/x-diff
Size: 28021 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081016/429ddb9b/attachment-0001.diff 


More information about the TYPO3-team-core mailing list