[TYPO3] How to get domain name thru typoscript
Elijah
elijah.alcantara at gmail.com
Sun Dec 30 14:32:56 CET 2007
Hi Peter,
Thanks for the help, the code fetched my root domain but when the menu
traverses down it's submenus with subdomains it still gets the root
domain. I guess it needs id's set manually? (sorry I rarely used case) I
was hoping for something that could fetch without setting id's since
I'll be having hundreds of subdomains/domains down the tree.
Maybe a separate php script is the way to go.. but I was hoping for a
typoscript way..
Best regards,
Elijah
Peter Klein wrote:
> 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