[TYPO3-english] MultiSite with different Provider extensions...
Jaco Graaff
jacograaff at spacexplorer.co.za
Fri Apr 7 01:50:40 CEST 2017
On 10/02/2017 12:27 PM, jacob graaff wrote:
> This is what I will do for now...
>
>
------------------------------------------------------------------------------------------------------------------------------------------------
>
....{see previous post}...
> EXT:sswebsite/Resources/Private/WebLayouts/
> [global]
>
------------------------------------------------------------------------------------------------------------------------------------------------
>
This did work - the following is also another solution:
COPIED FROM:
https://bstar.de/2016/08/25/typo3-and-conditional-typoscript-includes/
----------------------------------------------------------------------------------------------
"But since Typo3 7.6 there is something which can help.
They’ve added an extra parameter to the include statement: condition. So
you can include the statements based on a condition and there is no need
to have the condition inside the TS. So it’s very easy to switch between
two TS-Sets bases on a domain."
Just use this in your template:
<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/tpl/ts/includes.ts"
condition="userFunc = userIsNotDomain('new.example.com')" >
<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/tpl2016/ts/includes.ts"
condition="userFunc = userIsDomain('new.example.com')" >
And add this to your AdditionalConfiguration.php:
function userIsDomain( $domain ) {
if ( strcmp( $_SERVER['HTTP_HOST'], $domain) == 0 ) return true;
return false;
}
function userIsNotDomain( $domain ) { return !userIsDomain( $domain ); }
----------------------------------------------------------------------------------------------
I tried again to use multiple custom provision extensions - but kept on
failing - ran out of time so sticking with the conditional solution in
one provider extension. In that way I can still control different
subdomains on the same branch and data -
e.g.
Viral Website using limited JS and CSS for single display
and
Full website based on Bootstrap/Foundation on same Typo3 install
accessing same data
More information about the TYPO3-english
mailing list