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

"HocomAdvies [  Wiechert Hooghwinkel "HocomAdvies [  Wiechert Hooghwinkel
Fri Nov 6 14:05:18 CET 2015


Solved it. Had been doing the right things, but apparently I messed it up when editing the partial. Now it is giving me the “Bigger Picture”.
 
Anyone who has a sample (on-line) of Item.html file which is adapted for use with Foundation5 or Bootstrap? Or want to share what is the best practice to apply a nice design to the News (list, detail)? I have seen nice samples in websites. But I did dot find samples of partials adapted. 

Best regards,
Wiechert 






> Op 5 nov. 2015, om 16:24 heeft HocomAdvies [ 🌷 Wiechert Hooghwinkel ] <info at hocom-advies.nl> het volgende geschreven:
> 
> Any thoughts on this? Still did not solve it. 
> 
> Wiechert.
> 
>> Op 4 nov. 2015, om 19:46 heeft HocomAdvies [ 🌷 Wiechert Hooghwinkel ] <info at hocom-advies.nl> het volgende geschreven:
>> 
>> Now that it is working, I started to make some changes in the /partials/list/frontpage.html file. The changes I applied (change the height and width of the image) are applied. But there is no image in the output? 
>> 
>> On the page it looks like this:
>> 
>> <div class="news-img-wrap <>">				
>> 	<a href=“blog/blog-bericht/where-is-my-bigger-image?/ <view-source:http://www.webchecked.nl/blog/blog-bericht/nou-dat-is-er-al-weer-een-zeg/>“>	
>> 	<f:image src=“24” treatIdAsReference=“1 <>” title=“the bigger image” alt=“the bigger image” width==“500c” <> height=“290c <>”/></a>
>> </div>
>> 24 is the id of the uploaded image. The image is available, I can see that since it is used in the detail-view and in an other list-view on a different page. 
>> 
>> For the bigger image in this listview I have this in my TS
>> 
>> lugin.tx_news.settings{
>> list.media{
>>     # media configuration
>>       image{
>>         maxWidthBig=500c
>>         maxHeightBig=290c
>>       }
>> }
>> }
>> 
>> 
>> In the frontpage.html (which is a copy of item.html
>> 
>> I have changed:
>> 
>> maxWidth==“{settings.list.media.image.maxWidth}” maxHeight=“{settings.list.media.image.maxHeight} 
>> into:
>> width==“{settings.list.media.image.maxWidthBig}" height="{settings.list.media.image.maxHeightBig}
>> 
>> 
>> And this is the part where it alle comes together and things are messed up?:
>> <f:if condition="{mediaElement.originalResource.type} == 2">
>> 									<f:image src="{mediaElement.uid}" treatIdAsReference="1" title="{mediaElement.originalResource.title}" alt="{mediaElement.originalResource.alternative}" width=="{settings.list.media.image.maxWidthBig}" height="{settings.list.media.image.maxHeightBig}"/>
>> 								</f:if>
>> 
>> I cant see why the image.jpg itself is not outputted and only the id of it?
>> 
>> Any thoughts about where I did go wrong here? 
>> 
>> Regards,
>> 
>> Wiechert Hooghwinkel
>> 
>> 
>> 
>> 
>>> Op 3 nov. 2015, om 19:00 heeft HocomAdvies [ 🌷 Wiechert Hooghwinkel ] <info at hocom-advies.nl> het volgende geschreven:
>>> 
>>> Ralf-René, thanks for your support. It made me find the problem. Apparently the PageTS was not used. After I changed the order in the file, it worked. So probably the order in the PageTS.ts file can disturb things as wel :) 
>>> 
>>> Regards,
>>> 
>>> Wiechert Hooghwinkel
>>> 
>>> 
>>> 
>>>> Op 3 nov. 2015, om 17:46 heeft Ralf-Rene Schröder <ralf.rene at online.de> het volgende geschreven:
>>>> 
>>>> 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
>>>> _______________________________________________
>>>> TYPO3-project-news mailing list
>>>> TYPO3-project-news at lists.typo3.org
>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-news
>>> 
>>> _______________________________________________
>>> TYPO3-project-news mailing list
>>> TYPO3-project-news at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-news
>> 
>> _______________________________________________
>> TYPO3-project-news mailing list
>> TYPO3-project-news at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-news
> 
> _______________________________________________
> 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