[TYPO3-english] typoscript: How to add a userFunc property to the config.baseURL property?
typo3-community at gmx.de
Mon Nov 29 17:09:20 CET 2010
typoscript constants are not dynamic (!).
"small plugin": This is not working:
config.baseURL = USER_INT
config.baseURL.userfunc = myclass->subdomainBaseUrlFunction
"You can find it in the $TSFE": What do you mean by that?
On 29.11.2010 16:06, Kay Strobach wrote:
> you can write a small plugin which sets this property.
> You can find it in the $TSFE
> I do it with a little constant which is set in the Domains pagetemplate ;)
> Best regards
> Am 29.11.2010 15:48, schrieb Daniela Waranie:
>> 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/
>> 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.
>> 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