[TYPO3-mvc] Different Layouts in Fluid

Bastian Waidelich bastian at typo3.org
Fri Jun 22 13:12:45 CEST 2012


Claus Due wrote:
> On Jun 21, 2012, at 12:46 PM, Webmeck - TYPO3 wrote:

Hi Claus,

> Another note after reading - I like Bastian's approach for selecting Layout:
>
> <f:layout name="Default{someVar}" />

Good that you mention it, I forgot:

In my case I actually don't use different layouts but a different 
partial for the content, because my layouts are very similar (two 
columns by default one wide column for layout "Wide").
So in my "Site.html" template I write

<f:render partial="Content{layout}" arguments="{_all}" />

So the partial is "ContentDefault" by default and "ContentWide" if 
backend layout #2 is selected.


> …because that approach has fallback to "Default" on an empty variable. And
> I do enjoy falling back… ;)

Haha. I like falling back, too. I don't like falling *down* too much, 
though ;)


-- 
Bastian Waidelich
TYPO3 Core Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-typo3v4mvc mailing list