diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php index ecb4ed8..a8d036c 100644 --- a/Configuration/TCA/Overrides/sys_template.php +++ b/Configuration/TCA/Overrides/sys_template.php @@ -1,13 +1,22 @@ getMajorVersion() > 11) { + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( + 'headless_news', + 'Configuration/TypoScript/v12', + 'Headless News For V12' + ); + } else { + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( + 'headless_news', + 'Configuration/TypoScript', + 'Headless News' + ); + } }); diff --git a/Configuration/TypoScript/v12/constants.typoscript b/Configuration/TypoScript/v12/constants.typoscript new file mode 100644 index 0000000..3b6afe8 --- /dev/null +++ b/Configuration/TypoScript/v12/constants.typoscript @@ -0,0 +1,7 @@ +plugin.tx_news { + view { + templateRootPath = EXT:headless_news/Resources/Private/News/Templates/ + partialRootPath = EXT:headless_news/Resources/Private/News/Partials/ + layoutRootPath = EXT:headless_news/Resources/Private/News/Layouts/ + } +} \ No newline at end of file diff --git a/Configuration/TypoScript/v12/setup.typoscript b/Configuration/TypoScript/v12/setup.typoscript new file mode 100644 index 0000000..c241ef7 --- /dev/null +++ b/Configuration/TypoScript/v12/setup.typoscript @@ -0,0 +1,100 @@ +tt_content.news_pi1 =< lib.contentElementWithHeader +tt_content.news_pi1 { + fields { + content { + fields { + data = USER + data { + userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run + vendorName = GeorgRinger + extensionName = News + pluginName = Pi1 + controller = News + view < plugin.tx_news.view + persistence < plugin.tx_news.persistence + settings < plugin.tx_news.settings + settings { + dateFormat = TEXT + dateFormat = M d Y + dateTimeFormat = TEXT + dateTimeFormat = Y-m-d H:i:s + } + } + } + } + } +} + +tt_content.news_newsliststicky < tt_content.news_pi1 +tt_content.news_newsliststicky { + fields { + content { + fields { + data = USER + data { + pluginName = NewsListSticky + } + } + } + } +} + +tt_content.news_newsdatemenu < tt_content.news_pi1 + +tt_content.news_newssearchresult < tt_content.news_pi1 +tt_content.news_newssearchresult { + fields { + content { + fields { + data = USER + data { + pluginName = NewsSearchForm + } + } + } + } +} + +tt_content.news_categorylist < tt_content.news_pi1 +tt_content.news_categorylist { + fields { + content { + fields { + data = USER + data { + pluginName = CategoryList + controller = Category + } + } + } + } +} + +tt_content.news_taglist < tt_content.news_pi1 +tt_content.news_taglist { + fields { + content { + fields { + data = USER + data { + pluginName = TagList + controller = Tag + } + } + } + } +} + +tt_content.news_newsdetail < tt_content.news_pi1 +tt_content.news_newsdetail { + fields { + content { + fields { + data = USER + data { + pluginName = NewsDetail + } + } + } + } +} \ No newline at end of file diff --git a/Resources/Private/News/Partials/Files.html b/Resources/Private/News/Partials/Files.html index a717d39..0be8f68 100644 --- a/Resources/Private/News/Partials/Files.html +++ b/Resources/Private/News/Partials/Files.html @@ -2,7 +2,7 @@ [ - + {f:if(condition: imageSet, then: ',')} diff --git a/Resources/Private/News/Templates/News/List.html b/Resources/Private/News/Templates/News/List.html index 62cc4dd..73b2849 100644 --- a/Resources/Private/News/Templates/News/List.html +++ b/Resources/Private/News/Templates/News/List.html @@ -20,7 +20,8 @@ orderBy: settings.orderBy, orderDirection: settings.orderDirection, templateLayout: settings.templateLayout, - action: 'list' + action: 'list', + cropMaxCharacters: settings.cropMaxCharacters }"/> } @@ -46,7 +47,8 @@ orderBy: settings.orderBy, orderDirection: settings.orderDirection, templateLayout: settings.templateLayout, - action: 'list' + action: 'list', + cropMaxCharacters: settings.cropMaxCharacters }"/> } @@ -69,7 +71,7 @@ author: newsItem.author, authorEmail: newsItem.authorEmail }, - media: '{f:render(partial: \'Files\', arguments: \'{files: newsItem.media, view: \\\'list\\\', type: \\\'media\\\'}\') -> headless:format.json.decode()}', + media: '{f:render(partial: \'Files\', arguments: \'{files: newsItem.falMedia, view: \\\'list\\\', type: \\\'media\\\'}\') -> headless:format.json.decode()}', falRelatedFiles: '{f:render(partial: \'Files\', arguments: \'{files: newsItem.falRelatedFiles, view: \\\'list\\\', type: \\\'relatedFiles\\\'}\') -> headless:format.json.decode()}', categories: '{f:render(partial: \'Categories\', arguments: \'{categories: newsItem.categories}\') -> headless:format.json.decode()}', tags: '{f:render(partial: \'Tags\', arguments: \'{tags: newsItem.tags}\') -> headless:format.json.decode()}', diff --git a/Resources/Private/News/Templates/Vue/CeNews_pi1.vue b/Resources/Private/News/Templates/Vue/CeNews_pi1.vue index 741d5e2..237009b 100644 --- a/Resources/Private/News/Templates/Vue/CeNews_pi1.vue +++ b/Resources/Private/News/Templates/Vue/CeNews_pi1.vue @@ -5,7 +5,7 @@