TYPO3Buddy
TYPO3Buddy is on FacebookTYPO3Buddy is on Twitter
menu

TYPO3 Fluid: Create Fluid partials

Since you have introduced partials in your layout, you need to create them. Otherwise your website won't work. As said, you can leave out the partials and put them directly in your layout. For the sake of this tutorial you will create two partials.

Create a "header_top.html" file in the fileadmin/templates/partials folder. Edit it and put the following code in it:

<div id="header_top">
    <div id="header_top_left">
        <f:cObject typoscriptObjectPath="lib.header_top_left" />
    </div><!-- header_top_left -->
    <div id="header_top_right">
        <f:cObject typoscriptObjectPath="lib.header_top_right" />
    </div><!-- header_top_right -->
    <div class="clearer"></div>
</div>

Also create a "footer.html" file in the fileadmin/templates/partials folder. Edit it and put the following code in it:

<div id="footer">
    <div id="footer_left">
        <f:cObject typoscriptObjectPath="lib.footer_left" />
    </div><!-- footer_left -->
    <div id="footer_right">
        <f:cObject typoscriptObjectPath="lib.footer_right" />
    </div><!-- footer_right -->
    <div class="clearer"></div>
</div>

When you click on Filelist and look into the partials folder, you should see this:

TYPO3 Fluid tutorial: partials - TYPO3Buddy website tutorial

Please note: the file name of the partial file (without the extension) must be the same as the value of the partial property of the f:render viewhelper in your layout, which is <f:render partial="footer" /> for footer.html and <f:render partial="header_top" /> for header_top.html.

Next step: link your existing template to 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!