News articles in XML sitemap (Sitemap Made Simple)

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
katea
Forum Members
Forum Members
Posts: 116
Joined: Wed Jun 10, 2009 12:25 am

Re: News articles in XML sitemap (Sitemap Made Simple)

Post by katea »

On another note, is there anyway we can get the sitemap to recognise where a PDF file sits and list it accordingly?

xml-sitemaps.com picks up and lists the PDF's, and I know they're a ranking booster... Anything we can do with this?

Thanks
Last edited by katea on Fri Oct 09, 2009 1:12 pm, edited 1 time in total.
katea
Forum Members
Forum Members
Posts: 116
Joined: Wed Jun 10, 2009 12:25 am

SOLVED - BLOGS in XML sitemap (Sitemap Made Simple)

Post by katea »

For CGBlog

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}


{capture assign='junk'}{cms_module module='CGBlog' number="10000"}{/capture}
{foreach from=$items item=entry}
{assign var=utmpBLOGS value=$entry->detail_url}
<url>
  <loc>{$utmpBLOGS}</loc>
  <lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>
<priority>{$page->priority}</priority>
  <changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}

</urlset>

For BlogsMadeSimple

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}

{capture assign='junk'}{cms_module module='Blogs' numentries="10000"}{/capture}
{foreach from=$items item=entry}
{assign var=utmpBLOGS value=$entry->entryurl|replace:'//':'/60/'|replace:'http:/60':'http:/'}
<url>
  <loc>{$utmpBLOGS}</loc>
  <lastmod>{$entry->time|date_format:"%Y-%m-%d"}</lastmod>
<priority>{$page->priority}</priority>
  <changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
</urlset>

Change 60 to your number ;o)

Thanks to Jeremy Bass
JeremyBASS

Re: News articles in XML sitemap (Sitemap Made Simple)

Post by JeremyBASS »

wow how did this get moved here lol... glad to help, it's good karam for the soul :D
cheers
Jeremy
Locked

Return to “[locked] CMSMS MLE fork”