[TYPO3-english] How to create an email address dynamically using ts and getIndpEnv:TYPO3_HOST_ONLY
Peter Klein
pmk at io.dk
Sat Jul 18 13:24:26 CEST 2009
Hi Matt.
Try this:
10 = TEXT
10.data = getIndpEnv:TYPO3_HOST_ONLY
10.wrap = info@|
10.split {
token = .
cObjNum = 1 || || 2
1.current = 1
1.if.value = www
1.if.equals.current = 1
1.if.negate = 1
1.wrap = |.
2.current = 1
2.wrap = .|
}
--
Peter Klein / Umloud Untd.
"Matt K - [SwagmanInternet]" <typo3 at swagmaninternet.com> wrote in message
news:mailman.1.1247906308.9020.typo3-english at lists.netfielders.de...
> Hi,
>
> I am trying to create an email address dynamically using ts and
> getIndpEnv:TYPO3_HOST_ONLY
>
> I was hoping to be able to split/remove the 'www' off leaving only the
> 'domain.com.au' that I could then use 'wrap' and prefix it with info@
>
> eg: info at domain.com.au
>
> This is the typoscript I have so far:
>
> page.10.subparts.EMAIL_ADDRESS.data = getIndpEnv:TYPO3_HOST_ONLY
> page.10.subparts.EMAIL_ADDRESS.split {
> token = .
> cObjNum = 1
> 1.current = 1
> 1.wrap = info@|
> }
>
> but its output is:
>
> info at wwwinfo@domaininfo at cominfo@au
>
>
> Any suggestions appreciated?
>
> Kind regards,
>
> Matt
>
More information about the TYPO3-english
mailing list