[TYPO3-news] [TYPO3-project-news] Re: Template layouts
"HocomAdvies [ Wiechert Hooghwinkel
"HocomAdvies [ Wiechert Hooghwinkel
Tue Nov 3 19:00:33 CET 2015
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
More information about the TYPO3-project-news
mailing list