[TYPO3-mvc] shared templates/partials? Or something like skin support for FLUID/FLOW3/ExtBase

Franz Koch typo3.RemoveForMessage at elements-net.de
Mon Apr 12 10:50:56 CEST 2010


Hey there,

I currently have a customer request where a extbase/fluid based web app 
should change it's layout (and data) based on given parameters. You 
could compare it to a website where you can change the template/layout 
via a dropdown.

That itself wouldn't be that much of a problem - shouldn't there be 
shared partials among all templates. You might say now, simply create a 
symlink to a central partials folder, but some of those partials still 
need to be customizable. So it's unfortunately not that easy.


I was thinking now of a nice feature for FLUID: fallback templates, or 
let's better call it support for skins.


Imagine a structure like this:

default
   |- Templates
   |   |- Controller
   |       |- foo.html
   |       |- bar.html
   |- Partials
   |   |- pager.html
   |   |- dialogBox.html

design1
   |- Templates
   |   |- Controller
   |       |- foo.html
   |- Partials
   |   |- dialogBox.html


If you don't need multiple skins, you stick with one folder (default). 
If you have multiple skins, you create a own folder for each one. If a 
template/partial is not found in the currently used design/skin, FLUID 
(or extBase?) should try to grab it from the default one. So if I set my 
template basepath to "design1" and would require the template foo.html, 
it would be taken from design1/templates/controller/foo.html, but if I 
would require bar.html it would be taken from the default skin. Same for 
partials.

I know that there is support for different layouts in FLUID, but that's 
something quite different.

What do you guys think?
-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list