---
title: "News-Stichworte als Keyword in die Metatags?"
url: "https://www.typo3.net/d/22041-news-stichworte-als-keyword-in-die-metatags"
source: "typo3.net"
tags: ["Extensions","Frage","SEO","tt_news"]
created: "2005-03-04"
last_reply: "2005-04-06"
replies: 7
solved: false
page: 1
pages: 1
lang: "de"
---

# News-Stichworte als Keyword in die Metatags?

Extensions · 7 Antworten · gestartet 2005-03-04

## Eröffnungsbeitrag

**mic_jan** · 2005-03-04 · [Beitrag #1](https://www.typo3.net/d/22041-news-stichworte-als-keyword-in-die-metatags/1)

Hallo Leute,

weiss jemand, wie ich bei den News in der Single-Ansicht die Stichworte als Keywords in die Metatags bekomme?

Sachdienliche Hinweise sind willkommen!

Lieben Gruss

Michael

## Antworten

### [#2](https://www.typo3.net/d/22041-news-stichworte-als-keyword-in-die-metatags/2) · katees · 2005-04-05

Könnte sowas gerade jetzt auch gebrauchen!
Wurde irgendeine Lösung gefunden?

### [#3](https://www.typo3.net/d/22041-news-stichworte-als-keyword-in-die-metatags/3) · mic_jan · 2005-04-05

Bisher leider nicht  :(  Aber ich suche weiter...

Ich habe sogar schon ernsthaft in Erwägung gezogen, PHP dafür zu lernen...

Lieben Gruss

Michael

### [#4](https://www.typo3.net/d/22041-news-stichworte-als-keyword-in-die-metatags/4) · katees · 2005-04-05

Habe mir mal eine schnelle Lösung gebaut:

1. Habe ich mir die Datei meta.php aus dem Ordner typo3/etx/metatags in meine fileadmin-Struktur kopiert und dort meta.inc genannt.

2. Dann habe ich den Code in der Datei angepasst

```php
$localDescription = trim($this->stdWrap($local['description'],$local['description.']));
$localKeywords = trim($this->stdWrap($local['keywords'],$local['keywords.']));

// ab hier neuer Inhalt
$arrNews=t3lib_div::_GET('tx_ttnews');
$newsID = intval($arrNews['tt_news']);
if ($newsID>0){
	// fetch the News Infos
	$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
			'title,short,keywords', 
			'tt_news', 
			'uid='.$newsID, 
			'', 
			'', 
			'1');
	while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
		$localKeywords.=	trim(htmlspecialchars$row['keywords']));
		$localDescription.=	trim(htmlspecialchars($row['title']));
		$localDescription.=	trim(htmlspecialchars($row['short']));
	}	
}

//hier geht es normal weiter


// Unsetting secondary description and keywords if constant is not substituted!
```

3. Und dann noch im TS Setup folgendes eingetragen

```typoscript
plugin.meta{
  // Verweis auf die neue Datei
  file = fileadmin/meta.inc
  flags.DC = 1
}
seite.headerData.999 < plugin.meta
```

Das war's!

Ach ja, ich habe nicht nur die Keywords aus der News aufgenommen, sondern auch noch den Titel und den Untertitel-Text, damit ich was für die Beschreibung habe! Aber das ist ja Geschmackssache!

Getestet unter Typo3 Vers. 3.7!

### [#5](https://www.typo3.net/d/22041-news-stichworte-als-keyword-in-die-metatags/5) · mic_jan · 2005-04-06

Cooooooool!

Und damit hast du wieder bewiesen, dass es verdammt viel Sinn macht, dass ich PHP lerne  ;)

Lieben Gruss und Danke,

Michael

### [#6](https://www.typo3.net/d/22041-news-stichworte-als-keyword-in-die-metatags/6) · mic_jan · 2005-04-06

Und schon ein Nachtrag:
Jetzt hat Rupert eine neue Version von tt_news erstellt, die das gleich macht  ;)

Lieben Gruss

Michael

### [#7](https://www.typo3.net/d/22041-news-stichworte-als-keyword-in-die-metatags/7) · katees · 2005-04-06

Welche Version von tt_news meinst Du, und was kann man da einstellen?

### [#8](https://www.typo3.net/d/22041-news-stichworte-als-keyword-in-die-metatags/8) · mic_jan · 2005-04-06

So, da die Version noch nicht im Repository ist, habe ich mal den Text aus der Mailing-List hier reinkopiert:

> **Rupert German/ tt_news-Mailinglist schrieb:**
>
> hi,
>
> I uploaded these changes to the tt_news cvs project:
>
> - new XML-feed formats: rdf and atom03. A big thank goes to ingo renner who
> sent me patches and an updated manual.
> - removed the wrong default values from autoinc lines in tables.sql
> - added the possibility to render the content of the keywords field to a
> template marker (###NEWS_KEYWORDS###)
> - small field re-arrangement in tca.php to reduce the width of the tt_news
> BE form.
> - updated the manual with some of the new features (not complete)
>
> - added two new registers "newsSubheader" and "newsKeywords" which are set
> in the news singleView. this allows you to insert those values f.e. as
> metatags
>
> Example:
> # plugin.meta is configured to fill its contents to page.headerData.999
> # this will insert the values from the fields keywords and subheader to
> # the meta tags keywords and description
>
> page.headerData.999 {
>   local >
>   local {
>     description.data = register:newsSubheader
>     keywords.data = register:newsKeywords
>   }
> }

Gruss

Michael

---

Quelle: „News-Stichworte als Keyword in die Metatags?“, typo3.net, https://www.typo3.net/d/22041-news-stichworte-als-keyword-in-die-metatags
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
