[TYPO3-news] Template layouts

"HocomAdvies [  Wiechert Hooghwinkel "HocomAdvies [  Wiechert Hooghwinkel
Tue Nov 3 16:28:09 CET 2015


Anyone who can tell me what’s going wrong? I followed every step once again, but still the same result. Nothing in the plugin’s Template selector? Also the original extension files are still loaded and not the ones that were ment to override them? Strange behavior.


Regards,

Wiechert





> Op 3 nov. 2015, om 12:20 heeft HocomAdvies [ 🌷 Wiechert Hooghwinkel ] <info at hocom-advies.nl> het volgende geschreven:
> 
> Hello,
> 
> I want to customize my News system a bit. I tried to implement different templates for list-view. First started as explained in the https://docs.typo3.org/typo3cms/extensions/news/AdministratorManual/Templates/TemplateSelector/Index.html
> 
> Nothing happening in my BE and FE! So it seems that my config is nit used or implemented somehow I’m in typo3 6.2.6.   
> 
> What did I do?
> 
> First copied all the EXT:news/Resources to my /fileadmin/Templates/ext/news/
> 
> 
> This in in my TSconfig
> ### 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}
> 		}
> 	}
> }
> 
> 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)
> 
> 
> 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)
> 
> 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?  
> 
> I tried with this in the new template to test: <f:debug>{settings.templateLayout}</f:debug> but receive no output (could be expected because nothing is loaded…) 
> 
> The TSConfig and PageTS and Constants files are loaded. I can see that because other settings are available. Apparently I am overseeing something here? Anyone who can get me on the right track :)
> 
> Thanks.
> 
> Regards,
> HocomAdvies
> 
> 
> Wiechert Hooghwinkel
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> TYPO3-project-news mailing list
> TYPO3-project-news at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-news



More information about the TYPO3-project-news mailing list