From d1d3739827b32286db2c83d043805b84e3ff23c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tanel=20P=C3=B5ld?= Date: Sat, 22 Oct 2022 10:44:03 +0300 Subject: [PATCH] [TASK] Add title tag fallback and back end preview --- ChangeLog | 2 ++ Classes/Preview/PagelistPreviewRenderer.php | 3 +++ Configuration/TCA/Overrides/tt_content.php | 1 + Resources/Private/Partials/Card.html | 2 +- Resources/Private/Partials/ListArticle.html | 2 +- Resources/Private/Partials/ListEvent.html | 2 +- Resources/Private/Partials/ListPage.html | 2 +- Resources/Private/Partials/ListProduct.html | 2 +- Resources/Private/Partials/ListVacancy.html | 2 +- ext_emconf.php | 2 +- 10 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 12da44d..47f305c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -65,3 +65,5 @@ - [TASK] TYPO3 12 compatibility * 3.5.0 - [FEATURE] Add title tag option to content element for improved semantics control +* 3.5.1 + - [TASK] Add title tag fallback and back end preview diff --git a/Classes/Preview/PagelistPreviewRenderer.php b/Classes/Preview/PagelistPreviewRenderer.php index c90e158..df51d50 100644 --- a/Classes/Preview/PagelistPreviewRenderer.php +++ b/Classes/Preview/PagelistPreviewRenderer.php @@ -48,6 +48,9 @@ public function renderPageModulePreviewContent(GridColumnItem $item): string if ($row['tx_pagelist_template']) { $content .= '
  • ' . $this->linkEditContent($this->renderText('Template: ' . $row['tx_pagelist_template']), $row) . '
  • '; } + if ($row['tx_pagelist_titlewrap']) { + $content .= '
  • ' . $this->linkEditContent($this->renderText('Title tag: ' . $row['tx_pagelist_titlewrap']), $row) . '
  • '; + } if ($row['CType'] === 'pagelist_sub') { if ($row['tx_pagelist_orderby']) { $content .= '
  • ' . $this->linkEditContent($this->renderText('Order by: ' . $row['tx_pagelist_orderby']), $row) . '
  • '; diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index 03adfbd..25ea4bb 100755 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -282,6 +282,7 @@ $GLOBALS['TCA']['tt_content']['palettes']['pagelist_selected_layout']['showitem'] = ' tx_pagelist_template, + tx_pagelist_titlewrap, tx_pagelist_disableimages, tx_pagelist_disableabstract, '; diff --git a/Resources/Private/Partials/Card.html b/Resources/Private/Partials/Card.html index 0efd0f2..4f222af 100755 --- a/Resources/Private/Partials/Card.html +++ b/Resources/Private/Partials/Card.html @@ -15,7 +15,7 @@
    - <{data.tx_pagelist_titlewrap} class="title">{page.data.title} + <{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}

    diff --git a/Resources/Private/Partials/ListArticle.html b/Resources/Private/Partials/ListArticle.html index 828ae90..53b21d8 100644 --- a/Resources/Private/Partials/ListArticle.html +++ b/Resources/Private/Partials/ListArticle.html @@ -1,6 +1,6 @@

    - <{data.tx_pagelist_titlewrap} class="title">{page.data.title} + <{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}

    {page.data.author} diff --git a/Resources/Private/Partials/ListEvent.html b/Resources/Private/Partials/ListEvent.html index 4399114..ac05261 100644 --- a/Resources/Private/Partials/ListEvent.html +++ b/Resources/Private/Partials/ListEvent.html @@ -11,7 +11,7 @@

    - <{data.tx_pagelist_titlewrap} class="title">{page.data.title} + <{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}

    ☉ {page.data.tx_pagelist_eventlocation} diff --git a/Resources/Private/Partials/ListPage.html b/Resources/Private/Partials/ListPage.html index cef9a6e..c25095f 100755 --- a/Resources/Private/Partials/ListPage.html +++ b/Resources/Private/Partials/ListPage.html @@ -1,6 +1,6 @@

    - <{data.tx_pagelist_titlewrap} class="title">{page.data.title} + <{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}

    {page.data.abstract}

    diff --git a/Resources/Private/Partials/ListProduct.html b/Resources/Private/Partials/ListProduct.html index 571245d..5a8014e 100644 --- a/Resources/Private/Partials/ListProduct.html +++ b/Resources/Private/Partials/ListProduct.html @@ -1,6 +1,6 @@
    - <{data.tx_pagelist_titlewrap} class="title">{page.data.title} + <{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}

    {page.data.abstract}

    diff --git a/Resources/Private/Partials/ListVacancy.html b/Resources/Private/Partials/ListVacancy.html index 1b45a69..166ff6b 100644 --- a/Resources/Private/Partials/ListVacancy.html +++ b/Resources/Private/Partials/ListVacancy.html @@ -1,6 +1,6 @@
    - <{data.tx_pagelist_titlewrap} class="title">{page.data.title} + <{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}

    diff --git a/ext_emconf.php b/ext_emconf.php index 2577e51..49683d5 100755 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -4,7 +4,7 @@ 'title' => 'Pagelist', 'description' => 'Create page lists/teasers and add page types for news, events, products and vacancies.', 'category' => 'fe', - 'version' => '3.5.0', + 'version' => '3.5.1', 'state' => 'stable', 'clearCacheOnLoad' => true, 'author' => 'Tanel Põld',