---
title: "News-Sitemap mit Bildern: dd_googlesitemap kann es nicht. Welche EXT?"
url: "https://www.typo3.net/d/111945-news-sitemap-mit-bildern-dd-googlesitemap-kann-es-nicht-welche-ext"
source: "typo3.net"
tags: ["Extensions","Frage","SEO","tt_news"]
created: "2012-08-31"
last_reply: "2012-08-31"
replies: 0
solved: false
page: 1
pages: 1
lang: "de"
---

# News-Sitemap mit Bildern: dd_googlesitemap kann es nicht. Welche EXT?

Extensions · 0 Antworten · gestartet 2012-08-31

## Eröffnungsbeitrag

**topshopper** · 2012-08-31 · [Beitrag #1](https://www.typo3.net/d/111945-news-sitemap-mit-bildern-dd-googlesitemap-kann-es-nicht-welche-ext/1)

Hallo,

ich habe die aktuelle Version 1.0.6. von dd_googlesitemap im Einsatz mit Kombination von RealUrl und tt_news im Einsatz.

Die Extension generiert mir auch eine News-Sitemap, aber leider noch keine mit Bildern (Schema 1.1).

In der Klasse
class.tx_ddgooglesitemap_news_renderer.php

```html
<?php
/***************************************************************
*  Copyright notice
*
*  (c) 2009 Dmitry Dulepov <dmitry@typo3.org>
*  All rights reserved
*
*  This script is part of the TYPO3 project. The TYPO3 project is
*  free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
*  The GNU General Public License can be found at
*  http://www.gnu.org/copyleft/gpl.html.
*
*  This script is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

/**
 * [CLASS/FUNCTION INDEX of SCRIPT]
 *
 * $Id: class.tx_ddgooglesitemap_news_renderer.php 33292 2010-05-19 09:04:17Z dmitry $
 */

require_once(t3lib_extMgm::extPath('dd_googlesitemap', 'renderers/class.tx_ddgooglesitemap_abstract_renderer.php'));

/**
 * This class contains a renderer for the 'news' sitemap.
 *
 * @author	Dmitry Dulepov <dmitry@typo3.org>
 * @package	TYPO3
 * @subpackage	tx_ddgooglesitemap
 */
class tx_ddgooglesitemap_news_renderer extends tx_ddgooglesitemap_abstract_renderer {

	/**
	 * Contains google news site name
	 *
	 * @var string
	 */
	protected $sitename;

	/**
	 * Creates an instance of this class
	 *
	 * @return void
	 */
	public function __construct() {
		if ($GLOBALS['TSFE']->tmpl->setup['tx_ddgooglesitemap.']['google_news_site_name']) {
			$this->sitename = $GLOBALS['TSFE']->tmpl->setup['tx_ddgooglesitemap.']['google_news_site_name'];
		}
		else {
			$this->sitename = $GLOBALS['TSFE']->tmpl->setup['sitetitle'];
		}
		$this->sitename = htmlspecialchars($this->sitename);
	}

	/**
	 * Creates end tags for this sitemap.
	 *
	 * @return string	End XML tags
	 * @see tx_ddgooglesitemap_abstract_renderer::getEndTags()
	 */
	public function getEndTags() {
		return '</urlset>';
	}

	/**
	 * Creates start tags for this sitemap.
	 *
	 * @return string	Start tags
	 * @see tx_ddgooglesitemap_abstract_renderer::getStartTags()
	 */
	public function getStartTags() {
		return '<?xml version="1.0" encoding="UTF-8"?>' . chr(10) .
			'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" ' .
			'xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"' .
			'>' . chr(10);
	}

	/**
	 * Renders a single entry as a news entry.
	 *
	 * @param	string	$url	URL of the entry
	 * @param	string	$title	Title of the entry
	 * @param	int	$lastModification	News publication time (Unix timestamp)
	 * @param	string	$changeFrequency	Unused for news
	 * @param	string	$keywords	Keywords for this entry
	 * @return	string	Generated entry content
	 * @see tx_ddgooglesitemap_abstract_renderer::renderEntry()
	 */
	public function renderEntry($url, $title, $lastModification = 0, $changeFrequency = '', $keywords = '') {
		$content = '<url>';
		$content .= '<loc>' . $url . '</loc>';
		// News must have a publication date, so we put this unconditionally!
		$content .= '<news:news>';
		$content .= '<news:publication>';
		$content .= '<news:name>' . $this->sitename . '</news:name>';
		$content .= '<news:language>' . htmlspecialchars($GLOBALS['TSFE']->lang) . '</news:language>';
		$content .= '</news:publication>';
		$content .= '<news:publication_date>' . date('c', $lastModification) . '</news:publication_date>';
		$content .= '<news:title>' . htmlspecialchars($title) . '</news:title>';
		if ($keywords) {
			$content .= '<news:keywords>' . htmlspecialchars($keywords) . '</news:keywords>';
		}
		$content .= '</news:news>';
		$content .= '</url>';

		return $content;
	}
}

if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dd_googlesitemap/renderers/class.tx_ddgooglesitemap_news_renderer.php'])	{
	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dd_googlesitemap/renderers/class.tx_ddgooglesitemap_news_renderer.php']);
}

?>
```

ist das auch nicht implementiert.

Hat jemand von Euch die Extension um die Ausgabe auch von tt_news Bildern erweitert?

Oder gibt es eine andere Extension, die das kann?
Wer kennt sich aus?

Viele Grüße,
Erkan

---

Quelle: „News-Sitemap mit Bildern: dd_googlesitemap kann es nicht. Welche EXT?“, typo3.net, https://www.typo3.net/d/111945-news-sitemap-mit-bildern-dd-googlesitemap-kann-es-nicht-welche-ext
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
