Skip to content

Commit

Permalink
[TASK] Add title tag fallback and back end preview
Browse files Browse the repository at this point in the history
  • Loading branch information
t3brightside committed Oct 22, 2022
1 parent 486ba26 commit d1d3739
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 7 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions Classes/Preview/PagelistPreviewRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public function renderPageModulePreviewContent(GridColumnItem $item): string
if ($row['tx_pagelist_template']) {
$content .= '<li>' . $this->linkEditContent($this->renderText('Template: ' . $row['tx_pagelist_template']), $row) . '</li>';
}
if ($row['tx_pagelist_titlewrap']) {
$content .= '<li>' . $this->linkEditContent($this->renderText('Title tag: ' . $row['tx_pagelist_titlewrap']), $row) . '</li>';
}
if ($row['CType'] === 'pagelist_sub') {
if ($row['tx_pagelist_orderby']) {
$content .= '<li>' . $this->linkEditContent($this->renderText('Order by: ' . $row['tx_pagelist_orderby']), $row) . '</li>';
Expand Down
1 change: 1 addition & 0 deletions Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
';
2 changes: 1 addition & 1 deletion Resources/Private/Partials/Card.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</figure>
</f:if>
<div class="text">
<{data.tx_pagelist_titlewrap} class="title">{page.data.title}</{data.tx_pagelist_titlewrap}>
<{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}</{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')}>
<f:if condition="{page.authors} || {page.data.tx_pagelist_datetime}">
<p class="info">
<f:if condition="{page.data.tx_pagelist_datetime}"><span class="date">
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Partials/ListArticle.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="item article{f:if(condition: '{data.tx_pagelist_disableimages} == 1', then: ' noimage')}{f:if(condition: '{data.tx_pagelist_disableabstract} == 1', then: ' nointroduction')}">
<f:link.page pageUid="{page.data.uid}" target="{page.data.target}" title="{page.data.title}">
<{data.tx_pagelist_titlewrap} class="title">{page.data.title}</{data.tx_pagelist_titlewrap}>
<{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}</{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')}>
<f:if condition="{page.authors} || {page.data.tx_pagelist_datetime}">
<p class="info">
<f:if condition="{page.data.author}">{page.data.author}</f:if>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Partials/ListEvent.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</p>
</f:if>
<div class="text">
<{data.tx_pagelist_titlewrap} class="title">{page.data.title}</{data.tx_pagelist_titlewrap}>
<{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}</{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')}>
<f:if condition="{page.data.tx_pagelist_eventlocation}">
<p class="info location">
☉ {page.data.tx_pagelist_eventlocation}
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Partials/ListPage.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="item{f:if(condition: '{data.tx_pagelist_disableimages} == 1', then: ' noimage')}{f:if(condition: '{data.tx_pagelist_disableabstract} == 1', then: ' nointroduction')}">
<f:link.page pageUid="{page.data.uid}" target="{page.data.target}" title="{page.data.title}">
<{data.tx_pagelist_titlewrap} class="title">{page.data.title}</{data.tx_pagelist_titlewrap}>
<{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}</{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')}>
<f:if condition="{data.tx_pagelist_disableabstract} == 0">
<f:if condition="{page.data.abstract}">
<p class="abstract">{page.data.abstract}</p>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Partials/ListProduct.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="item product {f:if(condition: '{data.tx_pagelist_disableimages} == 1', then: ' noimage')}{f:if(condition: '{data.tx_pagelist_disableabstract} == 1', then: ' nointroduction')}">
<f:link.page pageUid="{page.data.uid}" target="{page.data.target}" title="{page.data.title}">
<{data.tx_pagelist_titlewrap} class="title">{page.data.title}</{data.tx_pagelist_titlewrap}>
<{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}</{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')}>
<f:if condition="{data.tx_pagelist_disableabstract} == 0">
<f:if condition="{page.data.abstract}">
<p class="abstract">{page.data.abstract}</p>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Partials/ListVacancy.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="item vacancy{f:if(condition: '{data.tx_pagelist_disableimages} == 1', then: ' noimage')}{f:if(condition: '{data.tx_pagelist_disableabstract} == 1', then: ' nointroduction')}">
<f:link.page pageUid="{page.data.uid}" target="{page.data.target}" title="{page.data.title}">
<{data.tx_pagelist_titlewrap} class="title">{page.data.title}</{data.tx_pagelist_titlewrap}>
<{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')} class="title">{page.data.title}</{f:if(condition: '{data.tx_pagelist_titlewrap}', then: '{data.tx_pagelist_titlewrap}', else: 'h3')}>
<f:if condition="{page.data.tx_pagelist_datetime}">
<p class="info">
<f:if condition="{page.data.tx_pagelist_datetime}">
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit d1d3739

Please sign in to comment.