-1

ich verwende die Typo3 Extension: tx_news.

Bei der Ausgabe des Newstitel im Browser gibt es keine Probleme. Ich frag mich aber ob es auch möglich ist die gewählte News-Kategorie als Browsertitel auszugeben?

Bevor der User zur gewählten Detail News kommt, durchläuft er schließlich einige Kategorien. In meinem Fall wird immer “ Alexander Möller – Blog “ angezeigt statt die jeweilige Kategorie unter der sich die verschiedenen News befinden.

Viele Liebe Grüße Alex

  • Please write in English. Schreibe biite auf Englisch. – Thomas Fritsch Aug 08 '17 at 16:50
  • I use the Typo3 extension: tx_news. There are no problems with the output of the Newstitel in the browser. I wonder if it is also possible to output the selected news category as browsertitel? Before the user comes to the selected detail news, he goes through some categories. In my case, "Alexander Möller - Blog" is displayed instead of the respective category under which the various news are located. Many love greetings Alex – Alexander Möller Aug 08 '17 at 19:27

1 Answers1

1

If you take a look at the Detail.html you fill find something like that

<f:if condition="{newsItem.alternativeTitle}">
    <f:then>
        <n:titleTag>
            <f:format.htmlentitiesDecode>{newsItem.alternativeTitle}</f:format.htmlentitiesDecode>
        </n:titleTag>
    </f:then>
    <f:else>
        <n:titleTag>
            <f:format.htmlentitiesDecode>{newsItem.title}</f:format.htmlentitiesDecode>
        </n:titleTag>
    </f:else>
</f:if>

This is the code responsible for the title tag. You can add the category title by adding this additional code inside the f:format.htmlentitiesDecode tag:

<f:if condition="{newsItem.firstCategory}">
  {newsItem.firstCategory.title}
</f:if>
Georg Ringer
  • 7,779
  • 1
  • 16
  • 34