[TYPO3-english] Synchronising front-end and back-end layouts
Dear All, We have upgraded to 4.5 and I would like to use the grid-view back-end layout. 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? Many thanks. Graham ___ TYPO3-english mailing list TYPO3-english@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Re: [TYPO3-english] Synchronising front-end and back-end layouts
Hi, Graham. 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 page.10.template.file.cObject { 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. Enjoy ;) ___ TYPO3-english mailing list TYPO3-english@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Re: [TYPO3-english] Synchronising front-end and back-end layouts
Sorry, I've read your post more careful and got the real problem. I con see only one way: run MySQL UPDATE on 'pages', where you'll set backend_layout field accordingly to layout field. Something, like this: UPDATE pages SET backend_layout=1 WHERE layout=1 (surely you need to use correct ids here) And after that you may use TS code, I provided. ___ TYPO3-english mailing list TYPO3-english@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english