[TYPO3-english] Synchronising front-end and back-end layouts
v-tyok at mail.ru
Tue Feb 7 10:47:14 CET 2012
> Our pages use 3 layouts selectable by individual editors. Under 4.5
> editors currently see both front-end and back-end selector boxes. I would
> like to remove this duplication and just show the back-end selectors. I
> would then refer to the back-end selector when rendering the page.
> My problem is that our existing pages do not have back-end layouts set. Is
> there a way I can set these by reference to the existing layout fields?
Sure, you can.
have a look at this piece of TS code:
page.10 = TEMPLATE
page.10.template = FILE
page.10.template.file.cObject = CASE
key.data = levelfield:-1,backend_layout_next_level,slide
key.override.field = backend_layout
1 = TEXT
1.value = fileadmin/templates/home.html
2 = TEXT
2.value = fileadmin/templates/inner_main.html
3 = TEXT
3.value = fileadmin/templates/inner_secondary.html
This code makes template file be changeable, depending on user's selection
of BE layout (regarding both fields: BE layout for current page and for
child pages). Key here is the uid of backend layout record.
More information about the TYPO3-english