Re: How to submit News using Sitemaps
Posted: Wed Oct 13, 2010 11:03 pm
Thanks for taking the time to share this. I found this useful.
Tony
Tony
Content management as it is meant to be
https://forum.cmsmadesimple.org/
Code: Select all
{foreach from=$items item=entry}
<url>
<loc>{$entry->detail_url}</loc>
<lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>
<changefreq>never</changefreq>
</url>
{/foreach}
Code: Select all
{* sitemap template *}
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
{foreach from=$output item='page'}
<url>
<loc>{$page->url}</loc>
<lastmod>{$page->date|date_format:"%Y-%m-%d"}</lastmod>
<priority>{$page->priority}</priority>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
{CGBlog showall="0" summarytemplate="CGBlogSiteMap"}
</urlset>
Code: Select all
{foreach from=$items item=entry}
<url>
<loc>{$entry->moreurl}</loc>
{if $entry->postdate}<lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>{/if}
<priority>1.0</priority>
<changefreq>always</changefreq>
</url>
{/foreach}