Page 1 of 1

Re: How to submit News using Sitemaps

Posted: Wed Oct 13, 2010 11:03 pm
by eferrini
Thanks for taking the time to share this.  I found this useful.

Tony

Re: How to submit News using Sitemaps

Posted: Mon Oct 25, 2010 12:13 pm
by Gregor
Thanks for posting.

I use CGBlog, therefore made a minor modification:

Create template CGBlogSiteMap

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}
In Sitemapmadesimple:

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>
I noticed in Sitemap MS that, once edited the Sample-template, after submitting the changes, the template does not show up in the template overview (2nd tab). Creating a new template called Sample, gives an error saying that the template already exists although it does not show up.

Any ideas?

Gregor

Re: How to submit News using Sitemaps

Posted: Thu Dec 08, 2011 5:13 pm
by blackhawk
Thank you. I'm using cmsms 1.10.2 and the NewsSiteMap Template that I'm using for Google Webmaster Tools, looks like this...

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}
Works for me.

The only catch I have noticed when updating your sitemap is that for every change you make in your news template, you have to go back to the info tab under sitemap made simple, and re-save it. Then go to your browser window to see your updated sitemap.xml file.

Hope that helps

Re: How to submit News using Sitemaps

Posted: Fri Dec 09, 2011 1:02 am
by manuel
Dear Blackhawk,

Please take a look at this article:
http://www.i-do-this.com/blog/57/Update ... with-a-UDT

Greetings,
Manuel

Re: How to submit News using Sitemaps

Posted: Fri Dec 09, 2011 2:46 am
by blackhawk
That helps! Thank you again!