[TYPO3-english] What are layout1, layout2, excetera?

Abramo Tesoro tesoro at archicoop.it
Mon Jun 19 14:33:33 CEST 2017


Il 19/06/17 13:28, Glenn S ha scritto:
> Relating to Typo3 7.6.
>
> Most records in TYPO 3 appear to have an option 'type', which can take 
> the following values:
>
> default
> layout1
> layout2
> layout3
> layout4
> layout5
> hidden
yes, these are the options of the headlines, you have them in every 
content with headlines
>
> However, I haven't been able to find anything in the documentation 
> explaining what these are.
>
> Through trial and error I've found that they at least control the 
> various <h> tags for headers.
>
> So, my questions:
>
> 1. Is this feature documented somewhere? If so, what is it called 
> (what search term should I use)?
I dont' know,
I've always seen them there
> 2. Where can I find the definition of their behaviour (what HTML will 
> be spat out for each layout)?
the default depends on your template, I think usually <h2></h2>
layout1 renders <h1></h1>
layout2 renders <h2></h2>
layout3 renders <h2></h2>
layout4 renders <h2></h2>
layout5 renders <h5></h5>
hidden doesn't render it in the html
> 3. I've created an extension using Fluid templates to control the 
> style and layout of my website. Should I pay attention to this 
> layout1, layout2, ... feature, or is it considered an obsolete way of 
> doing things now?
I don't know what you have to do in your extension, so I'm not sure,
I don't think you have to pay attention to it

if you want to control it in the fluid templates of your extension
you can take a look at the switch inside the file header.html in the 
folder Resources/Private/Partial/Header/ of the fluid styled content sysext
I copy it here:

<f:switch expression="{layout}">
     <f:case value="1">
         <h1><f:link.typolink 
parameter="{link}">{header}</f:link.typolink></h1>
     </f:case>
     <f:case value="2">
         <h2><f:link.typolink 
parameter="{link}">{header}</f:link.typolink></h2>
     </f:case>
     <f:case value="3">
         <h3><f:link.typolink 
parameter="{link}">{header}</f:link.typolink></h3>
     </f:case>
     <f:case value="4">
         <h4><f:link.typolink 
parameter="{link}">{header}</f:link.typolink></h4>
     </f:case>
     <f:case value="5">
         <h5><f:link.typolink 
parameter="{link}">{header}</f:link.typolink></h5>
     </f:case>
     <f:case value="6">
         <h6><f:link.typolink 
parameter="{link}">{header}</f:link.typolink></h6>
     </f:case>
     <f:case value="100">
         <f:comment> -- do not show header -- </f:comment>
     </f:case>
     <f:case default="true">
         <f:if condition="{default}">
             <f:render partial="Header/Header" arguments="{
                 header: header,
                 layout: default,
                 link: link}" />
         </f:if>
     </f:case>
</f:switch>
>
> Thanks,
> Glenn
I hope I'm be helpful

Abramo


More information about the TYPO3-english mailing list