[TYPO3-news] [TYPO3-project-news] Re: Template layouts

Ralf-Rene Schröder ralf.rene at online.de
Tue Nov 3 17:46:36 CET 2015


Am 03.11.2015 um 16:28 schrieb "HocomAdvies [
>> First copied all the EXT:news/Resources to my /fileadmin/Templates/ext/news/
OK, but you only need th parts you want to modify

>> This in in my TSconfig
i hop you meant the TSsetup of the Template record

>> ### tx_news config // voor eigen layout - template etc.
>> plugin.tx_news {
>> 	view {
>> 		templateRootPaths {
>> 			0 = EXT:news/Resources/Private/Templates/
>> 			1 = {$plugin.tx_news.view.templateRootPath}
>> 		}
>> 		partialRootPaths {
>> 			0 = EXT:news/Resources/Private/Partials/
>> 			1 = {$plugin.tx_news.view.partialRootPath}
>> 		}
>> 		layoutRootPaths {
>> 			0 = EXT:news/Resources/Private/Layouts/
>> 			1 = {$plugin.tx_news.view.layoutRootPath}
>> 		}
>> 	}
>> }
you don't need this, becaus this is in the TS from the extension itself

>> This is in my Constants file:
>>
>> plugin.tx_news {
>>       view {
>>               templateRootPath {
>>                       100 = fileadmin/Template/ext/news/Templates/
>>               }
>>               partialRootPath {
>>                       100 = fileadmin/Template/ext/news/Partials/
>>               }
>>               layoutRootPath {
>>                       100 = fileadmin/Template/ext/news/Layouts/
>>               }
>>       }
>> }
>>
>> (as was discussed here in the list some time ago)
it's wrong
it has to be:
plugin.tx_news.view {
  templateRootPath = fileadmin/Template/ext/news/Templates/
  partialRootPath = fileadmin/Template/ext/news/Partials/
  layoutRootPath = fileadmin/Template/ext/news/Layouts/
}


>> Then in my Page TS I added this:
>> tx_news.templateLayouts {
>>        99 = A custom layout
>> }
>>
>> In the Partials I created a new CustomLayout (Front_page_teaser.html)
use the right name, it's not a layout, it's a partial

and i, if i set such TSconfig things, i clear the cache in the
InstallTool (not sure if needed, but it gives me a better feeling)

>>
>> Made this available as new Layout through the List.html through a condition:
>>
>> <f:if condition="{settings.templateLayout} == 99">
>>                        <f:then>
>>                                <div class="news well news-special">
>>                                        <f:for each="{news}" as="newsItem">
>>                                                <f:render partial="List/Front_page_teaser" arguments="{newsItem: newsItem, settings:settings}"/>
>>                                        </f:for>
>>                                </div>
>>                        </f:then>
>>
>>
>> Emptied the cache files and included a News plugin on a page. But there is no possibility to select an other template?  
seems to be OK, but the the Template has to be there on the template tab
(maybe you have to store the plugin first, and then you see it)???


-- 
image[FORMAT] - Ralf-René Schröder
http://www.image-format.eu ... Wir geben Ihrem Image das richtige Format


More information about the TYPO3-project-news mailing list