Hi together,
I would like to combine the Image-Skills from Neos with responsive Design-Solution in more flexible form.
##What works currently:##
I found a solution to generate a <style>
tag in <head>
and it works for direct subNodeTypes from ContentCollection or other exactly predefined situations with:
${q(node).children('[instanceof TYPO3.Neos:ContentCollection]').children('[instanceof Vendor.Site:PredefinedNodeType]').add(*otherTypeSelection*)}
#Result in HTML:
@media screen {#id .class{ background-image: url('//website.neos/_Resources/Persistent/ec0fee7d5a7722671bfb78166ea9862411a03b77/image.jpg') }
@media screen and (min-width: 40em), screen and (....
##What is missing: more flexible solution##
For a more flexible solution (usable for all existing elements of a particular nodeType no matter where in the pageStructure but only in the current Page) I stumble over the impossibility to limit an FlowQuery’s find() to ONLY the current page/document without subPages/subDocuments. I can’t find the solution to exclude subpages.
It seems, this limitation is not provided. Maybe my approach is wrong and there is an more easy way from an other direction.
##Different approach/thinking and questions:##
- Is it possible to manipulate/add the <style>
tag in <head>
from an .ts2-Fusion/TypoScript File related to an NodeType?
#something like:
prototype(SpecialNodeType) < prototype(TYPO3.Neos:Content) {
page.head.style.@process.addNewLine = ${ value + "newLineAsString"}
}
```
I tried it in different manner, but I can't find a solution for...
(I guess: it cause on the building-sequence of neos-Sites . Most likely the page.head.style is builded before SpecialNodeType related elements.)
<small>But I'm not sure about. Can't find a building-sequence-flowChart or something similar. The NeosSourceCode is to complicated for me to understand/find the sequence of Neos' CodeProcessing and stepByStep debug and anyway break-points in fusion/typoScript are not possible</small>
***- Is it possible to store some value in included NodeType-related Fusion-Prototypes for combine it later on in root.ts2?***
Maybe with @context? I can't find a working solution with ...
<small> Maybe the same problem like above with build-sequence, but I'm not sure and maybe it's I have a completely wrong understanding of Neos' internal sequence of code-processing... Maybe there would be a totally simple solution for.</small>
***- Is there an other approach to process/find all used elements of one particular nodeType in current Page only (without subpages)?***
Would be great if someone could push me in the right direction...
Thanks Martin