[TYPO3-ttnews] Use settings.templateLayout in news

mail at ole-hartwig.eu mail at ole-hartwig.eu
Mon Dec 19 09:42:59 CET 2011


Hello,

I use the news-Extension in Version 1.2.3 from the TER and try to use 
settings.templateLayout. So I set in my localconf

$GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['templateLayouts'] = array(
0 => array(
	0 => 'first as Detail',
	1 => 'firstAsDetail'
),
1 => array (
	0 => 'first as Teaser',
	1 => 'firstAsTeaser'
)
);

so that I get the Option in the Select-Box, but if I one option and try 
to check the value in Fluid (Templates/News/List.html) it seems to be 
empty.

And here the Fluid-Template-Snip:

<n:widget.paginate objects="{news}" as="paginatedNews" 
configuration="{settings.list.paginate}">
   <f:for each="{paginatedNews}" as="newsItem" key="number">
     <f:if condition="{0:settings.templateLayouts} == 
{0:'firstAsDetail'}">
       <f:then>
         <f:if condition="{0:number} == {0:'0'}">
           <f:then>
             <f:render partial="List/Detail" arguments="{newsItem: 
newsItem, settings:settings, className:className, view:'detail'}"/>
           </f:then>
           <f:else>
             <f:render partial="List/Item" arguments="{newsItem: 
newsItem, settings:settings, className:className, view:'list'}"/>
           </f:else>
         </f:if>
       </f:then>
       <f:else>
         <f:render partial="List/Item" arguments="{newsItem: newsItem, 
settings:settings, className:className, view:'list'}"/>
       </f:else>
     </f:if>
   </f:for>
</n:widget.paginate>

If I check the TypoScript Object Browser there are no templateLayout 
set. So its maybe a Bug or have I forgot to configurate some option?

Thank you for your help!


Kind regards

Ole



More information about the TYPO3-project-tt-news mailing list