[TYPO3-english] best practise for multiple layouts (layout	selector) with tx_news?
    bernd wilke 
    t3ng at bernd-wilke.net
       
    Mon Jul 28 08:45:16 CEST 2014
    
    
  
not much traffic on typo3.projects.news
so I try it here anew:
I'm looking for an example/documentation for best practise how to use 
multiple layouts for displaying news.
the layouts should be selectable by editors, so the field 'Template 
Layout' on tab 'Template' seems the correct solution.
I found the chapter 'Custom Templates by using the Layout selector' in 
the manual [1] but this example seems only half way:
1. it covers only list mode (in detail mode the switching needs to be on 
different files/levels(?) )
2. this can not be handled in separate files but results in endless (for 
much more than two layouts) stacked f:if tags
I imagined something like:
news
: +-Private
: : +-Layouts
: : : +-layout1.html
: : : :
: : : +-layoutN.html
: : +-Partials
: : : +-p1.html
: : : :
: : : +-pN.html
: : +-Templates
: : : +-News
: : : : +-template1.html
: : : : :
: : : : +-templateN.html
where the selection in the plugin directly is assocciated with 
layoutX.html or templateX.html for each selection of 'what to display' 
(List view, detail view, date menu, ...)
So the possibility to deploy a set of templates (list, detail, ...) 
could be given by adding only some files (and maybe one additional TS 
config line), instead of adding another <f:if><f:then><f:else> in the 
central files.
[1] 
http://docs.typo3.org/typo3cms/extensions/news/Main/Templating/Additional/Index.html
bernd
-- 
http://www.pi-phi.de/cheatsheet.html
    
    
More information about the TYPO3-english
mailing list