[TYPO3-Solr] ViewHelper

Ingo Renner ingo at typo3.org
Wed Aug 31 13:01:44 CEST 2011


Am 26.08.11 15:43, schrieb Heiko Kromm | Paints:

Hello Heiko,

> is it possible to create own ViewHelpers?
> I want to add a daterange to the searchbox and would like to use a viewhelper there.

should be possible. Please check tx_solr_Template

addViewHelper()
addViewHelperIncludePath()
addViewHelperObject()

In tx_solr_pluginbase_PluginBase check initializeTemplateEngine()
There's a hook to add your tx_solr_ViewHelperProvider (interface).

The method also shows how to add your viewhelpers. You need to hook into 
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr'][$this->getPluginKey()]['addViewHelpers'], 
where is resolved per EXT:solr plugin: pi_results, pi_search, and some 
more in EAP...

Please let me know if that works for you and how you did it in the end 
since I only prepared the extension to be extendable in that area but 
never really tested it yet.

HTH
Ingo


-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2, Admin Google Summer of Code

TYPO3 - Open Source Enterprise Content Management System
http://typo3.org

Apache Solr for TYPO3 -
Open Source Enterprise Search meets Open Source Enterprise CMS
http://www.typo3-solr.com


More information about the TYPO3-project-solr mailing list