mad
(Martin Huber)
June 3, 2016, 10:52am
1
Hi, the role definition of the «PrimaryContent» for AIRA does not find the way to the sourceCode, like in his counterpart «ContentCollection»:
# root.ts2
content {
// Header section
header = ContentCollection {
attributes{
role = 'banner'
}
nodePath = 'header'
}
// The default content section
main = PrimaryContent {
attributes{
role = 'main'
}
nodePath = 'main'
}
// Footer section
footer = ContentCollection {
nodePath = 'footer'
}
}
Maybe I do something wrong? I tried different things, also .@process /.@context , but I can’t find a working solution. Neither in Docu, PHP-Code-study or with Google. Could someone help me to find the right solution?
christianm
(Christian Müller)
June 5, 2016, 3:10pm
2
PrimaryContent is another wrapper around ContentCollection (if you want to dig into that yourself, see Packages/Neos/TYPO3.Neos/Resources/Private/TypoScript/Prototypes/PrimaryContent.ts2
)
Basically
main = PrimaryContent {
default.attributes.role = 'main'
}
should do the trick in this case.
mad
(Martin Huber)
June 6, 2016, 8:17am
3
Hey Christian,
thank you for your help. I found your linked class, before I wrote the Topic and then tried it with:
main = PrimaryContent {
default.attributes{
role = 'main'
}
nodePath = 'main'
}
and also with:
main = PrimaryContent {
default.attributes.role = 'main'
nodePath = 'main'
}
Both version alternately in root.ts2.
Now, I tried it again, but there is and was no «rule» attribute in PrimaryContent!
I did also more than once:
./flow flow:cache:flush --force
./flow node:repair
But no change in SourceCode.
Does it work on your website? What could still be wrong?
christianm
(Christian Müller)
June 6, 2016, 8:45am
4
Indeed I made a mistake there, it should be:
default.renderer.attributes.role = 'main'
mad
(Martin Huber)
June 6, 2016, 8:52am
5
No it works fine!
And thanks to this, I guess, I grasp the logic in PrimaryContent.ts2.
Great - Thank you