I’m looking for a solution to customize the [html]-Tag.
In <a href: “http://neos.readthedocs.io/en/2.1/CreatingASite/RenderingCustomMarkup/AdjustingOutput.html”>docu-AdjustOutput-section there is a lot of info about elements in head and body.
Unfortunately, I can not deduce how I could use it to do something like this:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
<!--[if lt IE 7]><html class="no-js ie ie6 lt-ie9 lt-ie8 lt-ie7" lang="de"> <![endif]-->
<!--[if IE 7]><html class="no-js ie ie7 lt-ie9 lt-ie8" lang="de"> <![endif]-->
<!--[if IE 8]><html class="no-js ie ie8 lt-ie9" lang="de"> <![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="de"> <!--<![endif]-->
Or at least an:
<html class="no-js" lang="de">
for use with Modernizr.
I can’t find the Logic in Source Code for NodeType Page.
Only it’s supertype’d from TYPO3.Neos:Document. To search in Code for Page- or Document-Class or -Nodetype or something like this… to many matches
Tried to overwrite the Page NodeType with:
attributes.class = "no-js"
# other try:
class = "no-js"
both without success …
What is the easiest solution to
- use conditional in [html]-Tag?
- work with modernizr’s no-js ?
- find other options/attributes usable with NodeType Page?
Have a look at how the Page node type is configured/constructed and you should be able to figure it out…
the Reference is quite good, if I would know what I’m have to looking for .
I found by chance two of the three answers in the sourceCode, although I was looking for something total different . And as I knew, what particular term («htmlTag») is covering my question, Google has also found something finite:
First match bingo: http://neos.readthedocs.io/en/1.1/Appendixes/NeosTypoScriptReference.html#page
My solution for class=“no-js”
htmlTag.attributes.class = htmlTag.attributes.class != '' && htmlTag.attributes.class != null ? htmlTag.attributes.class + ' no-js' : 'no-js'
I’m not sure if I really have to check the current value of the class attribute. But better safe than sorry. Maybe someone else could give me an advise on the need for?
Answer on third question: Classes or Prototype-Definition to know what other attributes/elements are possible: (Perhaps others have as much as I trouble to tease out the right terms/places from the reference)
So far no answer found for question 2 :
How I could use conditional comments or something similar in -Tag in Neos CMS?
same second posted…
Thank you. I will study the code more deeper. Maybe I will found also an answer for conditional stuff…