[TYPO3-english] Switch content by domain or PIDupinRootline

Michael Cannon mc at aihr.us
Sat Sep 10 20:44:04 CEST 2011


Tony,

Don't forget to create the TS object

temp.contact = COA

temp.contact. or some such that you're working with. Next, the [end] was missing from the first conditional.

BTW, does hostname as a conditional really work? I'm used to doing the same via [globalString = IENV:HTTP_HOST= www.site1.com]

--
temp.contact = COA

#site1
[hostname=www.site1.com]
   temp.contact.10 = RECORDS
   temp.contact.10.tables = tt_content
   temp.contact.10.source = 1651
[end]

#Site 2
[hostname=www.site2.com]
   temp.contact.10 = RECORDS
   temp.contact.10.tables = tt_content
   temp.contact.10.source = 7629
[end]
--

Now if I was writing this stuff up and could consider site1.com the master in most cases, then I'd write the code more like this.

--
# master site 1
temp.contact = COA
temp.contact {
	10 = RECORDS
	10 {
		tables = tt_content
		source = 1651
	}
}
	
# site 2
[globalString = IENV:HTTP_HOST= www.site2.com]
	temp.contact.10.source = 7629
[end]

--


--
Michael Cannon
President, Aihrus
Italy +39 366 702 7237
US +1 617 539 6072

Professional TYPO3 Support Since 2003
http://aihr.us






More information about the TYPO3-english mailing list