[TYPO3-Solr] IF-ViewHelper and custom variables

Ingo Renner ingo at typo3.org
Mon Jan 23 18:06:13 CET 2012


Am 03.11.11 11:11, schrieb Heiko Kromm | Paints:

Hi Heiko,

sorry for the late response, but I still wanted to give an answer...

> my displayicons-Viewhalper sets a Variable DISPLAY_ICONS_STATUS.ACTIVE_DISPLAY. 
> I can output the variable, but the IF-ViewHelper does not resolve ist. 
> If I debug the conditions array in tx_solr_template, the comparand1 is ###DISPLAY_ICONS_STATUS.ACTIVE_DISPLAY###, not the resolved value. 

Sounds like an issue with the order in which things are resolved. You're
using a subpart-viewhelper, would it be possible to change this to a
marker-viewhelper?

Another way could be to modify the result documents when they arrive
from Solr, before handing them to the template engine and adding fields
you can use in the IF statement...
You could use either tx_solr_ResultDocumentModifier or
tx_solr_ResultSetModifier interfaces.


best
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