beardcoder/sitemap_generator

View on GitHub
Resources/Private/Templates/Sitemap/GoogleNewsList.xml

Summary

Maintainability
Test Coverage
{namespace news*}
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
  <f:layout name="Default"/>
<f:section name="main"><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
                               xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
<f:if condition="{urlEntries}">
<f:then>
  <f:for each="{urlEntries}" as="urlEntry"><url>
    <loc>
      {urlEntry.loc -> f:format.htmlentities()}
    </loc>
    <news:news>
      <news:publication>
        <news:name>{urlEntry.name -> f:format.htmlspecialchars()}</news:name>
        <news:language>{urlEntry.language}</news:language>
      </news:publication>
      <f:if condition="{urlEntry.access}"><news:access>{urlEntry.access}</news:access></f:if>
      <f:if condition="{urlEntry.genres}"><news:genres>{urlEntry.genres -> f:format.htmlspecialchars()}</news:genres></f:if>
      <news:publication_date>{urlEntry.publicationDate}</news:publication_date>
      <news:title>{urlEntry.title -> f:format.htmlspecialchars()}</news:title>
      <f:if condition="{urlEntry.keywords}"><news:keywords>{urlEntry.keywords -> f:format.htmlspecialchars()}</news:keywords></f:if>
      <f:if condition="{urlEntry.stockTickers}"><news:stock_tickers>{urlEntry.stockTickers}</news:stock_tickers></f:if>
    </news:news>
  </url>
  </f:for>
</f:then>
<f:else>
  <message>No entries found</message>
</f:else>
</f:if>

</urlset>
</f:section>
</html>