News articles in XML sitemap (Sitemap Made Simple)
News articles in XML sitemap (Sitemap Made Simple)
Hi Everybody,
I use SitemapMadeSimple to generate a Google compatible XML sitemap, but it doesn't include my news pages. Does anyone know how I can do this?
Thanks in Advance!
Chris
I use SitemapMadeSimple to generate a Google compatible XML sitemap, but it doesn't include my news pages. Does anyone know how I can do this?
Thanks in Advance!
Chris
Re: News articles in XML sitemap (Sitemap Made Simple)
A gift 
would work with blogs to...
jeremyBass

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'}{news number='1000'}{/capture}
{foreach from=$items item=entry}
<url>
<loc>{$entry->moreurl}</loc>
{if $entry->formatpostdate}
<lastmod>{$entry->formatpostdate|date_format:"%Y-%m-%d"}</lastmod>
{/if}
<priority>{$page->priority}</priority>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
</urlset>
jeremyBass
Re: News articles in XML sitemap (Sitemap Made Simple)
Correction on this... Blogs doesn't seem to work fully here ... the landing page in the url seems to be missing... I think that is the issue...
I'm sure someone like Calguy would know why but.. fix that and the we'd be back to what I said beofre...
Have a great one...
jeremyBass
fixed... look to this post for the bolg fix and the news fix..
http://forum.cmsmadesimple.org/index.ph ... #msg133319
I'm sure someone like Calguy would know why but.. fix that and the we'd be back to what I said beofre...
Have a great one...
jeremyBass
fixed... look to this post for the bolg fix and the news fix..
http://forum.cmsmadesimple.org/index.ph ... #msg133319
Last edited by JeremyBASS on Wed Nov 26, 2008 5:18 pm, edited 1 time in total.
Re: News articles in XML sitemap (Sitemap Made Simple)
Google accepts not only it's own xml sitemap format but also RSS . So you can add both the xml sitemap from the Sitemap Made Simple module and the RSS feed of your news pages.
Re: News articles in XML sitemap (Sitemap Made Simple)
I also fixed the news and blogs up alittle better look to the tips and tricks area... here is the post it's self witht he news fix...
http://forum.cmsmadesimple.org/index.ph ... #msg133319
http://forum.cmsmadesimple.org/index.ph ... #msg133319
Last edited by JeremyBASS on Wed Nov 26, 2008 5:16 pm, edited 1 time in total.
Re: News articles in XML sitemap (Sitemap Made Simple)
JeremyBASS wrote: A gift
would work with blogs to...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'}{news number='1000'}{/capture} {foreach from=$items item=entry} <url> <loc>{$entry->moreurl}</loc> {if $entry->formatpostdate} <lastmod>{$entry->formatpostdate|date_format:"%Y-%m-%d"}</lastmod> {/if} <priority>{$page->priority}</priority> <changefreq>{$page->frequency}</changefreq> </url> {/foreach} </urlset>
jeremyBass
Hi Jeremy, This works great in News, but where do I put this in Blogs?
Thanks

Re: News articles in XML sitemap (Sitemap Made Simple)
Well you'd want to capture the blog output... so {capture assign='junk'}{CGBlog pagelimit="100000" }{/capture} or what have you.. then it's just the parts of the defualt template.
So this can be done for more than just blogs or news,... got products? Have a User directory via FEU or Company directories? With this route you can take hold and make an almost permanent link for every nooke and crany of a CMSMS site..
Code: Select all
{capture assign='junk'}{CGBlog pagelimit="100000" }{/capture}
{foreach from=$items item=entry}
<url>
<loc>{$entry->detail_url}</loc>
{if $entry->formatpostdate}
<lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>
{/if}
<priority>{$page->priority}</priority>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
So this can be done for more than just blogs or news,... got products? Have a User directory via FEU or Company directories? With this route you can take hold and make an almost permanent link for every nooke and crany of a CMSMS site..
Last edited by JeremyBASS on Wed Oct 07, 2009 10:06 pm, edited 1 time in total.
Re: News articles in XML sitemap (Sitemap Made Simple)
Hi Jeremy,
Thanks for the swift reply ...
This is mmy template, but the sitemap only picks up just one of the entries
Help!!! ;o)
p.s It was my first blog entry thast it picked up ... Not sure if that helps?
Thanks for the swift reply ...
This is mmy template, but the sitemap only picks up just one of the entries
Code: Select all
{* sitemap template *}
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
{foreach from=$output item='page'}
<url>
<loc>{$page->url}</loc>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
</urlset>
{capture assign='junk'}{CGBlog pagelimit="100000" }{/capture}
{foreach from=$items item=entry}
<url>
<loc>{$entry->detail_url}</loc>
{if $entry->formatpostdate}
<lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>
{/if}
<priority>{$page->priority}</priority>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
p.s It was my first blog entry thast it picked up ... Not sure if that helps?
Last edited by katea on Wed Oct 07, 2009 10:50 pm, edited 1 time in total.
Re: News articles in XML sitemap (Sitemap Made Simple)
Took out the post count and just put {CGBlog} and still the same ...
I cleared the cache and everything, but still just the first post
Oh, and the URL comes up as
http://www.mysite.com/cgblog/1//MyFirstEntry
Instead of
http://www.mysite.com/Blog/1/60/MyFirstEntry
So Blog is being changed to cgblog and I'm getting a double // after 1
I cleared the cache and everything, but still just the first post
Oh, and the URL comes up as
http://www.mysite.com/cgblog/1//MyFirstEntry
Instead of
http://www.mysite.com/Blog/1/60/MyFirstEntry
So Blog is being changed to cgblog and I'm getting a double // after 1
Last edited by katea on Wed Oct 07, 2009 11:05 pm, edited 1 time in total.
Re: News articles in XML sitemap (Sitemap Made Simple)
welll.. look to the blog.... look to the Default summary page that should fix it... for the //
Re: News articles in XML sitemap (Sitemap Made Simple)
Sorry, I'm lost... I should look at changing the blog template?JeremyBASS wrote: welll.. look to the blog.... look to the Default summary page that should fix it... for the //
Right now it's working good with the url's,, it's just the sitemap isn't picking up the entries... I don't really want to be messing around with the blog unless I can get it close to working,m getting all the URL's etc...
I know I'm a pain, but I really want this to work to save me from having to manually update my sitemap every time I post a blog entry.
I thank you for your patience Jeremy

Re: News articles in XML sitemap (Sitemap Made Simple)
Sorry that was vage there... got to Content » Calguys Blog Module and in the options, and set the Default summary page ... that should fix it...
Re: News articles in XML sitemap (Sitemap Made Simple)
Hi Jeremy,JeremyBASS wrote: Sorry that was vage there... got to Content » Calguys Blog Module and in the options, and set the Default summary page ... that should fix it...
OK, I did that, but I could only change the cgblog to blog, which is a great start obviously ....
However, in the sitemap, I sill only have the first entry and I still have the /1//entry instead of the 1/60/entry
I've played around with the code quite a bit, but getting this to work seems impossible.
Strange though as it works great in News!!!
Re: News articles in XML sitemap (Sitemap Made Simple)
well this worked for me...
just replace 51 with the page you want it to land on...
Code: Select all
{capture assign='junk'}{Blogs numentries="10000"}{/capture}
{foreach from=$items item=entry}
{assign var=utmpBLOGS value=$entry->entryurl|replace:'//':'/51/'|replace:'http:/51':'http:/'}
<url>
<loc>{$utmpBLOGS}</loc>
<lastmod>{$entry->time|date_format:"%Y-%m-%d"}</lastmod>
<priority>{$page->priority}</priority>
<changefreq>{$page->frequency}</changefreq>
</url>
{/foreach}
just replace 51 with the page you want it to land on...