Skip to content

Instantly share code, notes, and snippets.

Created November 7, 2015 14:44
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
FluidTYPO3 one-pager with sections
<div xmlns="" lang="en"
<f:layout name="Page" />
<f:section name="Configuration">
<!-- Make this page type configurable -->
<flux:form id="sections">
<flux:form.sheet name="sections">
<flux:form.section name="sections">
<flux:form.object name="section" label="{sectionTitle}">
<flux:field.input name="sectionTitle" label="Section title" />
<flux:field.checkbox name="fullWidth" label="Full-width" />
<flux:field.checkbox name="fullWidthBackground" label="Full-width background" />
<flux:field.input name="backgroundColor" label="Background color" >
<flux:wizard.colorPicker />
<!-- Define the backend layout -->
<!-- We have one fixed defined column on top -->
<flux:grid.column name="Slider" colPos="222" />
<!-- If we have sections in use -->
<f:if condition="{sections -> f:count()} > 0">
<f:for each="{sections}" as="section" iteration="iteration">
<!-- Every section that has been configured in the sheet above will be output as a column in the backend layout -->
<flux:grid.column name="content.{iteration.index}" colPos="{iteration.index}" label="{f:if(condition: section.section.title, then: section.section.title, else: 'Content, section {iteration.cycle}')}" />
<f:section name="Main">
<h1>The always present slider column</h1>
<v:content.render column="222" />
<f:for each="{sections}" as="sectionObject" iteration="iteration">
<!-- We don't want to write sectionObject.section everytime, so we assign it to a temporary variable-->
<v:variable.set name="section" value="{sectionObject.section}" />
<f:if condition="{section.fullWidth}">
<div class="container-fluid" {f:if(condition: section.fullWidthBackground, then:'style="background-color: {section.backgroundColor};"')}>
<h1 class="text-center">{section.sectionTitle} (colPos: {iteration.index})</h1>
<v:content.render column="{iteration.index}" />
<div class="container" {f:if(condition: section.backgroundColor, then:'style="background-color: {section.backgroundColor};"')}>
<h1 class="text-center">{section.sectionTitle} (colPos: {iteration.index})</h1>
<v:content.render column="{iteration.index}" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment