Each website that is managed inside a TYPO3 instance (represented by a domain), needs to include the correct configuration. This can easily be done via the TYPO3 backend and is the recommended way of doing it.
The PageTSConfig must be included inside the TYPO3-backend. To do so, go to the domain-level entry in the pagetree and click 'edit'. Inside the 'Resources'-tab, you can now select the correct PageTSConfig.
There are only three static includes that are required. You should not need to set any other include here, as all extension TypoScript should be included and handled inside the project-* extensions.
To set the includes, go to the Template-module inside your TYPO3-backend, select the correct domain-level-entry inside the pagetree and choose "Info/Modify" in the upper dropdown. Then click on "Edit the whole template record" and select the "Includes" tab. Include the following items in the correct order:
- Content Elements (fluid_styled_content)
- Project - Theme (Bootstrap) (project_theme)
The fluid_styled_content include is necessary for the basic rendering of content-elements. The other two includes are provided by our project-* extensions. Note that their names might be slightly different in multi-domain setups, as there might be a different project_theme extension for each domain.
Each template corresponds with a Backend Layout. To set the correct template for a page, go to its settings (right click in pagetree -> edit) and select the correct Template inside the 'Appearance'-tab. You should also set the layout for subpages of the page.
As mentioned above, it is possible to provide to run multiple websites inside the same website-base instance. This can be achieved by providing different Aggregates for each domain. Each Aggregate will then include the configuration (Layouts, Templates, Partials, Extensions, etc.) that are needed for the corresponding domain. That way, it is possible to share components between two websites (e.g. both websites could use the same sidebar-partial, but use different Layouts), as well as create unique one for each domain. By convention, components that are meant to be used for a specific website only, are postfixed with the websites name.
+ Layouts + MainCompanyWebsite.html + MainMarketingWebsite.html
You need to adjust the domain settings in the htaccess and the 404 settings in the AdditionalConfiguration.php. In order to set different typoscript and theme options, please use another typoscript aggregate in your project_theme and just add the required stuff for this domain setup. If your websites differ much, you can also copy the project_theme and then adjust all required stuff for your specific needs in your second domain.
Regarding the page typoscript: If you can't share the globally used page typoscript, create two different versions and include them yourself into relevant domain root pages. Remove the include page typoscript line from the ext_localconf.php in this case or use it for some shared settings.
Don't forget to set the following typoscript in your configuration to allow linking across domains:
# allow links across domains config.typolinkEnableLinksAcrossDomains = 1
Each domain will need its own PageTSConfig file. Create one for each domain:
Add a corresponding entry in 'project_theme/Configuration/TCA/Overrides/pages.php` to make the config available as a static include.
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile( 'project_theme', 'Configuration/TypoScript/PageTSConfig/DomainOne.typoscript', 'Project Theme One' ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile( 'project_theme', 'Configuration/TypoScript/PageTSConfig/DomainTwo.typoscript', 'Project Theme Two' );
Each Aggregate must be available as a static include in the TYPO3-backend. Those includes are defined in 'project_theme/ext_tables.php':
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( 'project_theme', 'Configuration/TypoScript/Aggregates/ThemeOne', 'Project Theme One' ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( 'project_theme', 'Configuration/TypoScript/Aggregates/ThemeTwo', 'Project Theme Two' );
NOTE: It's already deactivated by default in this project base.
- Make sure that the TYPO3 patch "languageCopyModeDisableConfiguration.diff" is applied on this project.
- Add the following code to this ext_localconf.php
// Disables the copy mode for content translations $GLOBALS['TYPO3_CONF_VARS']['BE']['disableTranslationModeCopy'] = TRUE;
You just need to add the following TypoScript into the users "TSconfig".
options.language.disableCopyMode = 1