[TYPO3] How to get domain name thru typoscript
Peter Klein
peter at umloud.dk
Fri Dec 28 13:58:31 CET 2007
Hi Elijah.
I had to do something similar a while ago, and did it using CASE.
The problem is that you can't use "select" on tables starting with "sys_" so
short of writing a userfunc, I did this:
-- cut --
lib.domain = COA
lib.domain {
10 = CASE
10.key.data = leveluid:0
10.default = TEXT
10.default.data = DB:sys_domain:2:domainName
10.52 = TEXT
10.52.data = DB:sys_domain:1:domainName
}
page.100 < lib.domain
-- cut --
It uses the rootpid "leveluid:0" to determine which domain record to fetch.
--
Peyter Klein / Umloud Untd
"Elijah" <elijah.alcantara at gmail.com> wrote in message
news:mailman.1.1198655233.19410.typo3-english at lists.netfielders.de...
> Hi,
>
> I'm just trying to get a domain name :
>
> lib.currentdomain = TEXT
> lib.currentdomain {
> data = DB : sys_domain : {GPvar:pid} : domainName
> data.wrap3 = {|}
> data.insertData = 1
> }
>
>
> I followed that snippet somewhere from this list but it doesn't work, it
> will only work when I replace {GPvar:pid} with the correct pid number from
> a domain record.
>
> Has anyone done this before?
>
>
>
> Regards,
> Elijah
More information about the TYPO3-english
mailing list