whats best practice when I have multiple countries with domains and all need to run off my NEOS install? are there more that one globe (root)?
my client wants to manage 2 different sites but with same nodes and each site has multiple domains for different countries and languages
mficzel
(Martin Ficzel)
November 28, 2016, 8:04am
2
Hello Egbert,
running multiple sites in parallel is no problem if you are using seperate site-packages. If you want to create multiple sites that are based on the same site-package neos 2.3 can do this but is currently missing the needed commands to create a new empty site based on a package. Those commands and also a be-function for that will be available soonish in 3.0.
Adding multiple domains to a site is no problem at all and can be done in the sites-module. However binding language dimensions to a domain is not that simple especially if you want to avoid the language-uri-segment wich is used by default. There are solutions for that but they have to be configured individually.
A thing that still is a bit hard is sharing/reusing contents between sites and linking between sites. Usually all those problems can be solved but it requires some experimenting to find a good solution.
If you describe the intended setup a bit more detailed i can say more.
Regards, Martin
Shadow
(Shane Richards)
November 28, 2016, 3:35pm
3
Hey Martin,
These are configurations we’ve been having issues with for our content dimensions.
Our Settings.yaml:
TYPO3:
Form:
yamlPersistenceManager:
savePath: 'resource://Country.Germany/Private/Form/'
presets:
myCustom:
title: 'Custom Elements'
parentPreset: 'default'
formElementTypes:
'TYPO3.Form:Form':
renderingOptions:
templatePathPattern: 'resource://Country.Germany/Private/CustomElements/Form.html'
'TYPO3.Form:Section':
renderingOptions:
templatePathPattern: 'resource://Country.Germany/Private/CustomElements/Section.html'
'TYPO3.Form:SingleLineText':
renderingOptions:
templatePathPattern: 'resource://Country.Germany/Private/CustomElements/SingleLineText.html'
'TYPO3.Form:SingleSelectDropdown':
renderingOptions:
templatePathPattern: 'resource://Country.Germany/Private/CustomElements/SingleSelectDropdown.html'
'TYPO3.Form:Checkbox':
renderingOptions:
templatePathPattern: 'resource://Country.Germany/Private/CustomElements/Checkbox.html'
'TYPO3.Form:MultiLineText':
renderingOptions:
templatePathPattern: 'resource://Country.Germany/Private/CustomElements/MultiLineText.html'
'TYPO3.Form:Base':
renderingOptions:
layoutPathPattern: 'resource://Country.Germany/Private/CustomElements/Layouts/{@type}.html'
TYPO3CR:
contentDimensions:
'language':
label: 'Language'
icon: 'icon-language'
default: 'en'
defaultPreset: 'en'
presets:
'en':
label: 'EN'
values: ['en']
uriSegment: 'english'
'fr':
label: 'FR'
values: ['fr', 'en']
uriSegment: 'francais'
'de':
label: 'DE'
values: ['de', 'en']
uriSegment: 'deutsch'
'country':
label: 'Country'
icon: 'icon-globe'
default: 'de'
defaultPreset: 'de'
presets:
'de':
label: 'Deutschland'
values: ['de']
uriSegment: 'de'
'os':
label: 'Österreich'
values: ['os']
uriSegment: 'os'
Neos:
typoScript:
autoInclude:
'SimplyAdmire.Neos.Video': TRUE
nodeTypes:
groups:
Videos:
position: 400
label: 'Videos'
Sliders:
position: 300
label: 'Carousel-sliders'
Menu:
position: 200
label: 'Menu'
Content:
position: 100
label: 'Content'
Partials:
position: 500
label: 'Partials'
Our Root.ts2:
/**
* Root TypoScript template for the Country.Germany site
*/
prototype(TYPO3.Neos:DimensionsMenu) < prototype(TYPO3.TypoScript:Template)
page = Page {
head {
stylesheets.site = TYPO3.TypoScript:Template {
templatePath = 'resource://Country.Germany/Private/Templates/Page/Default.html'
sectionName = 'stylesheets'
}
javascripts.site = TYPO3.TypoScript:Template {
templatePath = 'resource://Country.Germany/Private/Templates/Page/Default.html'
sectionName = 'headScripts'
}
meta = TYPO3.TypoScript:Template {
templatePath = 'resource://Country.Germany/Private/Templates/Page/Default.html'
sectionName = 'meta'
}
}
body {
templatePath = 'resource://Country.Germany/Private/Templates/Page/Default.html'
sectionName = 'body'
parts {
mainMenu = Menu
mainMenu {
templatePath = 'resource://Country.Germany/Private/Templates/Page/MainMenu.html'
entryLevel = 1
maximumLevels = 3
}
mobileMainMenu = Menu
mobileMainMenu {
templatePath = 'resource://Country.Germany/Private/Templates/Page/MobileMainMenu.html'
entryLevel = 1
maximumLevels = 3
}
languageMenu = TYPO3.Neos:DimensionsMenu {
dimension = 'language'
templatePath = 'resource://Country.Germany/Private/Templates/Page/LanguageMenu.html'
}
mobileLanguageMenu = TYPO3.Neos:DimensionsMenu {
dimension = 'language'
templatePath = 'resource://Country.Germany/Private/Templates/Page/MobileLanguageMenu.html'
}
countryMenu = TYPO3.Neos:DimensionsMenu {
dimension = 'country'
templatePath = 'resource://Country.Germany/Private/Templates/Page/CountryMenu.html'
}
mobileCountryMenu = TYPO3.Neos:DimensionsMenu {
dimension = 'country'
templatePath = 'resource://Country.Germany/Private/Templates/Page/MobileCountryMenu.html'
}
breadcrumb = BreadcrumbMenu
}
// These are your content areas, you can define as many as you want, just name them and the nodePath.
content {
// The default content section
header = ContentCollection {
nodePath = 'header'
collection = ${q(site).children('header').children()}
attributes.id = 'sub-nav-wrapper'
}
main = ContentCollection {
nodePath = 'main'
}
footer = ContentCollection {
nodePath = ${q(site).children('footer').property('_path')}
collection = ${q(site).children('footer').children()}
}
}
javascripts.site = TYPO3.TypoScript:Template {
templatePath = 'resource://Country.Germany/Private/Templates/Page/Default.html'
sectionName = 'bodyScripts'
}
}
prototype(TYPO3.Neos.NodeTypes:Form) {
presetName = 'myCustom'
}
}
include: NodeTypes/*.ts2
include: resource://JohannesSteu.Bootstrap.GridSystem/Private/TypoScript/Root.ts2
and the Language and Country menu templates (both identical):
{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace ts=TYPO3\TypoScript\ViewHelpers}
<li class="dropdown dropdown-accordion language-menu" {attributes -> f:format.raw()}>
<f:for each="{items}" as="item">
<f:if condition="{item.state} == 'current'">
<a class="dropdown-toggle dropdown-small" data-toggle="dropdown" aria-expanded="false">
{item.label}
<span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
</a>
</f:if>
</f:for>
<f:render section="itemsList" arguments="{items: items}" />
</li>
<f:section name="itemsList">
<ul class="dropdown-menu main-menu dropdown-select" role="menu">
<f:for each="{items}" as="item">
<li{ts:render(path: '{item.state}.attributes', context: {item: item}) -> f:format.raw()}>
<f:if condition="{item.node}">
<f:then>
<neos:link.node node="{item.node}">{item.label}</neos:link.node>
</f:then>
<f:else>
{item.label}
</f:else>
</f:if>
</li>
</li>
</f:for>
</ul>
</f:section>
Shadow
(Shane Richards)
November 28, 2016, 3:58pm
4
It’s also not showing through on the frontend for some reason. We solved most of the issues with it:
https://discuss.neos.io/t/language-menu-rendering/1409/7
However, the menu seemingly disappeared randomly last week but none of the configurations have been edited.
mficzel
(Martin Ficzel)
November 28, 2016, 6:41pm
5
Hello Shane
… interesting how a generic questions leads to very concrete problem:
prototype(TYPO3.Neos:DimensionsMenu) < prototype(TYPO3.TypoScript:Template)
This line looks really weird … you basically tell Neos to use a plain-template instead of the dimension menu. While this might work because the dimension-menu inherits from the template it may cause strange effects.
To understand wether your problem resides in the ts2/fusion code or the template add <f:debug>{items}</f:debug>
to your menu-template. You should recieve an array of items that have a state
and a node
property.
Regards Martin
PS: Please post only the relevant parts of your code … in this case this would have been the dimension-configuration and the dimension-menu part of your Root.ts2. It takes time to read and answer this.
Shadow
(Shane Richards)
November 29, 2016, 1:00am
6
Sorry about the unnecessary bits. The dump from the debug tags only confirmed that the dimensions aren’t being passed through.
mficzel
(Martin Ficzel)
November 29, 2016, 8:15am
7
Where did you put the f:debug … if it recieves some html instead of an array of items you have found the source of the problem.
Did you remove the line here like i suggested?
prototype(TYPO3.Neos:DimensionsMenu) < prototype(TYPO3.TypoScript:Template)
Shadow
(Shane Richards)
November 29, 2016, 7:13pm
8
Yup, but there were some other configurations in the Root.ts2 that needed to be adjusted as well that cleared up the issue.
Thanks for the help.
Shadow
(Shane Richards)
November 29, 2016, 7:49pm
9
We’re still having one lingering issue with the pages when the content dimensions are changed. The global elements (header and footer) aren’t being generated.
On the default language and country we generated them through a node repair command to generate them
flow node:repair --node-type TYPO3.Neos.NodeTypes:Page
However, the suggested node repairs aren’t generating the collections on the pages for the other languages and countries as seen below
Shadow
(Shane Richards)
November 29, 2016, 9:04pm
10
We ended up resetting the sit through pruning and re-running the migration
./flow node:migrate 20150716212459