TYPO3Buddy
TYPO3Buddy is on FacebookTYPO3Buddy is on Twitter
menu

TYPO3 Fluid: Link your existing template to the layout

Now that you have a layout, you'll have to link the content template (fileadmin/templates/main_1_column_with_menu.html) to the layout and indicate in which section it will be placed. The TYPO3Buddy layout has only one section, you nevertheless need to declare this explicitely in your content template. Open fileadmin/templates/main_1_column_with_menu.html and edit the file until it looks like this:

<f:layout name="main_layout" />
<f:section name="content">
<div id="content">
    <div id="content_menu">
        <f:cObject typoscriptObjectPath="lib.content_menu" />
    </div>
    <div id="content_main">
        <f:format.raw>{content_main}</f:format.raw>
    </div>
    <div class="clearer"></div>
</div>
</f:section>

Note that the value of the name property of the f:layout viewhelper is the same as the file name of your layout (without the extension): <f:layout name="main_layout" /> for main_layout.html.

Next step: tell your TYPO3 installation to use the layout ->

The TYPO3Buddy website is a tutorial to rebuild the TYPO3Buddy website from scratch. You can choose from a TYPO3 Fluid tutorial and a TYPO3 Templavoila tutorial. You'll build TYPO3 websites like you've done so for years!