-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] News title with seo_basic (#39)
* [FIX] fixed title tag for categories and tags pages, also for news detail view. Added news to breadcrumbs. * [FIX] removed using of custom title viewhelper
- Loading branch information
Showing
7 changed files
with
463 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
lib.pageTitle = TEXT | ||
|
||
[userFunc = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('seo_basics')] | ||
lib.pageTitle.data = page:tx_seo_titletag // page:title | ||
[else] | ||
lib.pageTitle.data = page:title | ||
[global] |
94 changes: 53 additions & 41 deletions
94
Resources/Private/Extensions/News/Templates/Category/List.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,58 @@ | ||
{namespace n=GeorgRinger\News\ViewHelpers} | ||
<f:layout name="General" /> | ||
<!-- | ||
===================== | ||
Templates/Category/List.html | ||
--> | ||
<div xmlns="http://www.w3.org/1999/xhtml" lang="en" | ||
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers" | ||
xmlns:n="http://typo3.org/ns/GeorgRinger/News/ViewHelpers"> | ||
|
||
<f:section name="content"> | ||
<f:if condition="{categories}"> | ||
<f:then> | ||
<f:layout name="General" /> | ||
<!-- | ||
===================== | ||
Templates/Category/List.html | ||
--> | ||
|
||
<f:section name="content"> | ||
<f:if condition="{categories}"> | ||
<f:then> | ||
<f:render section="categoryTree" arguments="{categories:categories,overwriteDemand:overwriteDemand}" /> | ||
</f:then> | ||
<f:else> | ||
<f:translate key="list_nocategoriesfound" /> | ||
</f:else> | ||
</f:if> | ||
</f:section> | ||
|
||
<f:render section="categoryTree" arguments="{categories:categories,overwriteDemand:overwriteDemand}" /> | ||
</f:then> | ||
<f:else> | ||
<f:translate key="list_nocategoriesfound" /> | ||
</f:else> | ||
</f:if> | ||
</f:section> | ||
<f:section name="categoryTree"> | ||
<div class="news-categories" > | ||
<ul> | ||
<f:for each="{categories}" as="category"> | ||
<li> | ||
<f:if condition="{category.item.uid} == {overwriteDemand.categories}"> | ||
<f:then> | ||
<f:comment> | ||
Set title tag for active category | ||
</f:comment> | ||
<n:format.nothing> | ||
<n:titleTag> | ||
<n:format.htmlentitiesDecode><f:cObject typoscriptObjectPath="lib.pageTitle"/> - {category.item.title}</n:format.htmlentitiesDecode> | ||
</n:titleTag> | ||
</n:format.nothing> | ||
|
||
<f:section name="categoryTree"> | ||
<div class="news-categories" > | ||
<ul> | ||
<f:for each="{categories}" as="category"> | ||
<li> | ||
<f:if condition="{category.item.uid} == {overwriteDemand.categories}"> | ||
<f:then> | ||
<f:link.page title="{category.item.title}" class="active" pageUid="{settings.listPid}" | ||
additionalParams="{tx_news_pi1:{overwriteDemand:{categories: category.item.uid}}}">{category.item.title} | ||
</f:link.page> | ||
</f:then> | ||
<f:else> | ||
<f:link.page title="{category.item.title}" pageUid="{settings.listPid}" | ||
additionalParams="{tx_news_pi1:{overwriteDemand:{categories: category.item.uid}}}">{category.item.title} | ||
</f:link.page> | ||
</f:else> | ||
</f:if> | ||
<f:link.page title="{category.item.title}" class="active" pageUid="{settings.listPid}" | ||
additionalParams="{tx_news_pi1:{overwriteDemand:{categories: category.item.uid}}}">{category.item.title} | ||
</f:link.page> | ||
</f:then> | ||
<f:else> | ||
<f:link.page title="{category.item.title}" pageUid="{settings.listPid}" | ||
additionalParams="{tx_news_pi1:{overwriteDemand:{categories: category.item.uid}}}">{category.item.title} | ||
</f:link.page> | ||
</f:else> | ||
</f:if> | ||
|
||
<f:if condition="{category.children}"> | ||
<f:render section="categoryTree" arguments="{categories: category.children,overwriteDemand:overwriteDemand}" /> | ||
</f:if> | ||
</li> | ||
</f:for> | ||
</ul> | ||
</div> | ||
</f:section> | ||
</div> | ||
|
||
<f:if condition="{category.children}"> | ||
<f:render section="categoryTree" arguments="{categories: category.children,overwriteDemand:overwriteDemand}" /> | ||
</f:if> | ||
</li> | ||
</f:for> | ||
</ul> | ||
</div> | ||
</f:section> |
84 changes: 52 additions & 32 deletions
84
Resources/Private/Extensions/News/Templates/News/DateMenu.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,53 @@ | ||
{namespace n=GeorgRinger\News\ViewHelpers} | ||
<f:layout name="General" /> | ||
<!-- | ||
===================== | ||
Templates/News/DateMenu.html | ||
--> | ||
<div xmlns="http://www.w3.org/1999/xhtml" lang="en" | ||
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers" | ||
xmlns:n="http://typo3.org/ns/GeorgRinger/News/ViewHelpers"> | ||
|
||
<f:layout name="General" /> | ||
<!-- | ||
===================== | ||
Templates/News/DateMenu.html | ||
--> | ||
|
||
<f:section name="content"> | ||
<div class="news-menu-view"> | ||
<ul> | ||
<f:for each="{data.single}" key="year" as="months"> | ||
<li> | ||
{year} | ||
<ul> | ||
<f:for each="{months}" key="month" as="count"> | ||
<f:if condition="{0:year, 1:month} == {0:overwriteDemand.year, 1:overwriteDemand.month}"> | ||
<f:then> | ||
<f:comment> | ||
Set title tag for date menu active item | ||
</f:comment> | ||
<n:format.nothing> | ||
<n:titleTag> | ||
<n:format.htmlentitiesDecode><f:cObject typoscriptObjectPath="lib.pageTitle"/> - <f:translate key="month.{month}" /> {year}</n:format.htmlentitiesDecode> | ||
</n:titleTag> | ||
</n:format.nothing> | ||
|
||
<li class="item itemactive"> | ||
<f:render section="datemenuLink" arguments="{listPid: listPid, year: year, month: month, count: count, entry: entry, entries: entries}"/> | ||
</li> | ||
</f:then> | ||
<f:else> | ||
<li class="item"> | ||
<f:render section="datemenuLink" arguments="{listPid: listPid, year: year, month: month, count: count, entry: entry, entries: entries}"/> | ||
</li> | ||
</f:else> | ||
</f:if> | ||
</f:for> | ||
</ul> | ||
</li> | ||
</f:for> | ||
</ul> | ||
</div> | ||
</f:section> | ||
|
||
<f:section name="datemenuLink"> | ||
<f:link.action pageUid="{listPid}" arguments="{overwriteDemand:{year: year, month: month}}"><f:translate key="month.{month}" /> {year}</f:link.action> | ||
({count} <f:translate key="{f:if(condition: '{count} == 1', then: 'entry', else: 'entries')}" />) | ||
</f:section> | ||
</div> | ||
|
||
<f:section name="content"> | ||
<div class="news-menu-view"> | ||
<ul> | ||
<f:for each="{data.single}" key="year" as="months"> | ||
<li> | ||
{year} | ||
<ul> | ||
<f:for each="{months}" key="month" as="count"> | ||
<f:if condition="{0:year, 1:month} == {0:overwriteDemand.year, 1:overwriteDemand.month}"> | ||
<f:then> | ||
<li class="item itemactive"> | ||
</f:then> | ||
<f:else> | ||
<li class="item"> | ||
</f:else> | ||
</f:if> | ||
<f:link.action pageUid="{listPid}" arguments="{overwriteDemand:{year: year, month: month}}"><f:translate key="month.{month}" /> {year}</f:link.action> | ||
({count} <f:translate key="{f:if(condition: '{count} == 1', then: 'entry', else: 'entries')}" />) | ||
</li> | ||
</f:for> | ||
</ul> | ||
</li> | ||
</f:for> | ||
</ul> | ||
</div> | ||
</f:section> |
Oops, something went wrong.