[TYPO3-mvc] Why is this section uknown? Can layouts only have one section?

Henjo Hoeksma me at henjohoeksma.nl
Mon Jan 2 10:36:18 CET 2012


To clarify more: you do not call the Layout first. The layout is called
from the template ;-)

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.


On Sun, Jan 1, 2012 at 19:31, Henjo Hoeksma <me at henjohoeksma.nl> wrote:

> Hi Stephen,
>
> happy new year!
>
> If you have in your layout a section it expects that section to exist. You
> call the template file based on the action in your controller.
>
> I.e. the singleAction of the ItemController calls the
> Templates/Item/Single.html file for the view.
>
> If you want to render multiple sections it should be possible to access
> it. In your case I guess you would have to move the Metatags templates to a
> partial, Partial/Item/MetaTags.html and instead of rendering a section, you
> can render the partial now.
>
> Hope this helps understanding the error you receive.
>
> Kind regards,
>
> Henjo
>
> Problems are small because we learned how to deal with them.
> Problems are big because we need to learn how to deal with them.
>
>
>
> On Sat, Dec 31, 2011 at 13:26, Stephen Bungert <stephenbungert at yahoo.de>wrote:
>
>> I have a layout like this:
>>
>> <div class="portfolio portfolioItem portfolioSingle">
>> <f:render section="itemMetatags" />
>> <f:render section="itemSingle" />
>> </div>
>>
>> <f:render section="itemMetatags" /> is new, if I take it away, everything
>> is
>> ok. But if I leave it there I get an error message:
>>
>> "#1227108982: Could not render unknown section "itemMetatags" in
>> Tx_Fluid_View_TemplateView used by
>> Tx_SbPortfolio2_Controller_**ItemController"
>>
>> I have saved the section template here:
>>
>> "Resources/Private/Templates/**Item/Metatags.html"
>>
>> ---
>>
>> <f:render section="itemSingle" /> works ok and has a template saved here:
>>
>> "Resources/Private/Templates/**Item/Single.html"
>>
>> so why does the itemMetatags section cause an error?
>>
>> ______________________________**_________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
>> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>>
>
>


More information about the TYPO3-project-typo3v4mvc mailing list