[TYPO3] Automating the <base> url tag

Elijah elijah.alcantara at gmail.com
Mon Apr 28 14:23:42 CEST 2008


Hi, 

Thanks for the reply. But I will be using a non-finite set of domains,
I'd like it to be as automated as possible since the domain records are
added as soon as my users sign up. 


Regards, 
Elijah 


On Mon, 2008-04-28 at 14:03 +0200, Christopher Torgalson wrote:
> Hi,
> 
> On Mon, Apr 28, 2008 at 1:19 PM, Elijah Alcantara
> <elijah.alcantara at gmail.com> wrote:
> > Hello,
> >
> >  I have a lib.domain ts that outputs the current domain name, I'd like
> >  to apply this to the baseurl of the site like this:
> >
> >  config.baseURL < lib.domain
> >
> >  But I guess that is not the proper way... I get a "TEXT" value in it instead.
> >
> >  I've then tried adding the <base href="domainname" /> into the
> >  page.headerData , it worked... but party, It seems that some css are
> >  now lost since the base tag is now below the styles css when viewed
> >  from the html source.
> >
> >
> >  Is there a better way of doing this? and am I replicating the baseURL
> >  = 1 security issue?
> 
> 
> Question: are you using a finite and known set of domains? If so, then
> something like this:
> 
> [globalString = HTTP_HOST=*example.com]
>    lib.siteName = example.com
> [globalString = HTTP_HOST=*example.ca]
>    lib.siteName = example.ca
> [globalString = HTTP_HOST=*example.net]
>    lib.siteName = example.net
> [global]
> 
> ...in the constants field of the template, and something like this:
> 
> config.baseURL = http://www.{$lib.siteName}/
> 
> ...in the setup field works. If you've got a non-finite or
> indeterminate set of domains, I can't think of an immediate solution…
> 

--
http://pinoguin.com 



More information about the TYPO3-english mailing list