[TYPO3-mvc] Fluid condition on ENV Constant

Stefan Frömken firma at sfroemken.de
Tue Jul 24 14:10:10 CEST 2012


Am 23.07.2012 19:01, schrieb Thomas "Thasmo" Deinhamer:
> Hi folks,
>
> how would I process this TypoScript
> condition via Fluid without the use
> of setting anything via TypoScript:
>
>      [globalString = ENV:HTTP_HOST = *.domain.tld]
>
> Would I need to create a custom viewhelper?
>
> Thanks,
> Thomas

I would create my own ViewHelper.

ENV:HTTP_HOST you can get with t3lib_div::getIndpEnv('HTTP_HOST')

In class.t3lib_matchcondition_abstract.php you can find a method 
"searchStringWildcard" for the *.domain.com-Sample.
Further you can find "globalString" as "case" part in this file, too. 
Search for it, copy it to your ViewHelper make some modifications and it 
should work.

Stefan


More information about the TYPO3-project-typo3v4mvc mailing list