Adding configuration fields to a typo3 page with fluid / flux -
i have setup site use flux / fluidcontent templates , have working using tutorial here: http://thomas.deuling.org/2011/06/create-base-html-fluid-templates-for-typo3-4-5/
it's working want able choose image per page , use build big header. templavoila create fields available in page properties can't seem working fluidcontent.
i using typo3 6.1 , here inside page flex template:
{namespace v=tx_vhs_viewhelpers} {namespace flux=tx_flux_viewhelpers} <f:layout name="main" /> <f:section name="content"> <f:format.raw>{content_header}</f:format.raw> <div id="content"> <div class="container"> <div class="row"> <div class="col-md-3"> <f:format.raw>{content_left}</f:format.raw> </div> <div class="col-md-9"> <f:format.raw>{content}</f:format.raw> </div> </div> </div> </div> </f:section>
how can add form fields page properties , use them in templates?
i afraid, mix things bit.
flux
, fluidcontent
, (especially important you) fluidpages
play extend default capabilities of creating fluid
templates typo3.
- flux base technology parsing , reconstituting typo3 form fields.
- fluidcontent utilizes flux allow flexible content elements
- fluidpages utilizes flux allow page layouts in pure fluid custom fields
to summarize: have read tutorial concerning basic fluid
page templating, not fluidpages
templating. started quickly, there examples , documentation resources available:
- the quickstart documentation repository
- the speciality provider extension bootstrap package (please use caution-this example, not next project template)
- the extensions
fluidcontent_bootstrap
,fluidpages_bootstrap
when through resources, know how register provider extension, can select in page properties in backend.
your template might (it's taken aforementioned speciality extension):
<!-- note namespace declaration depends on version of flux using --> {namespace v=tx_vhs_viewhelpers} {namespace flux=fluidtypo3\flux\viewhelpers} <f:layout name="page"/> <div xmlns="http://www.w3.org/1999/xhtml" lang="en" xmlns:v="http://fedext.net/ns/vhs/viewhelpers" xmlns:flux="http://fedext.net/ns/flux/viewhelpers" xmlns:f="http://typo3.org/ns/fluid/viewhelpers"> <f:section name="configuration"> <flux:form id="1column" label="1 column layout"> <!-- options visible in page property --> <flux:field.input name="settings.carousel.categories" eval="trim" default="4" /> <flux:field.input name="settings.carousel.width" eval="trim" default="1200"/> <flux:field.input name="settings.carousel.height" eval="trim" default="340"/> <flux:field.checkbox name="settings.carousel.caption" default="1"/> <!-- grid displayed in page module --> <flux:grid> <flux:grid.row> <flux:grid.column colpos="0" label="main content"/> </flux:grid.row> </flux:grid> </flux:form> </f:section> <f:section name="content"> <div class="row" role="main"> <div class="col-md-12" role="section"> <v:page.content.render column="0"/> <f:if condition="{v:var.typoscript(path: 'lib.addthis.display')}"> <f:render section="addthis" partial="addthis" optional="true" arguments="{_all}"/> </f:if> </div> </div> </f:section> </div>
most flux templates (regardless wether fluidpages or fluidcontent) split (at least) 3 f:section
fluid sections:
- configuration takes form fields
- preview influences how template being previewed in backend
- usually content or main (you can influence naming, in layout files should stick conventions spread accross example extensions) renders fce/page template
the field
items usable accessing them via name
attribute getter. illustrate this, access {settings.carousel.caption}
inside page template above.
Comments
Post a Comment