[TYPO3-english] typoscript: How to add a userFunc property to the config.baseURL property?

Daniela Waranie typo3-community at gmx.de
Mon Nov 29 15:48:48 CET 2010


Hi all,

i have RealURL running and a very long list of subdomains. The server is
configured to lead all subdomains (*) to the TYPO3 instance. For each
subdomain a typo3 domain record is defined in typo3 - introduced /
modified by an external programm. RealURL requires to set config.baseURL
to have all relative links (CSS, JS) working.

To have a long list of typoscript conditions like this is not good,
because i can not add the typoscript progammatically:
[globalString = ENV:HTTP_HOST=sub1.mydomain.com]
config.baseURL = http://sub1.mydomain.com/
[...]
[end]

The config.baseURL expects to get a string, but i want to have it more
flexible. I want to have the HTTP_HOST (input) to be checkt against the
typo3 domain records and is exists then use the subdomain as baseURL,
else use a default URL. (Input check is not my problem)

But how to extend the config.baseURL property have a userFunc result as
its value.
E.g.
config.baseURL = USER_INT
config.baseURL.userfunc = myclass->subdomainBaseUrlFunction

Sure this would lead into a core hack (or similar), but that is ok for me.

How to add userFunc support to the config.baseURL? What file to edit?
Code example available?

Please help
Daniela Waranie




More information about the TYPO3-english mailing list