[TYPO3-english] How to choose frontend template based on be_layout for good performance

Jigal van Hemert jigal.van.hemert at typo3.org
Tue Nov 25 00:01:30 CET 2014


Hi,

On 24/11/2014 18:57, Urs Braem wrote:
> page.10 = TEMPLATE
> page.10 {
>     stdWrap.if {
[...]
> }
> page.20 = TEMPLATE
> page.20 {
>     stdWrap.if {
[...]
> }
[...]
>
> Do I interpret this correctly? What is the correct, perf-efficient way
> to do this? Or is it a bug?

You could use a CASE here:

page.10 = TEMPLATE
page.10 {
   template = CASE
   template {
     key.data = levelfield:-1,backend_layout_next_level,slide
     key.override.field = backend_layout
     1 = FILE
     1.file = fileadmin/templates/main/tmpl/main.html
     2 = FILE
     2.file = fileadmin/templates/main/tmpl/special.html
   }
}


-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

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


More information about the TYPO3-english mailing list