ExpressionEngine Google Sitemaps Using the Pages Module
I recently upgraded to the full version of ExpressionEngine for this site, and have stopped using Core. When I did that, I started using EE’s Pages module. When using the Pages module, I found that I needed to tweak my Google sitemap in order to show the correct URIs for my static pages. Below is the code I used: you can find my original entry here: ExpressionEngine Google Sitemaps.
{exp:weblog:entries weblog="static_pages" limit="500"
disable="categories|custom_fields|member_data|pagination|trackbacks"
rdf="off" show_pages="yes" status="Open"}
<url>
<loc>{page_url}</loc>
<lastmod>{gmt_edit_date format="{DATE_W3C}"}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
{/exp:weblog:entries}
Posted on Jan 07, 2009 - 04:49 PM
Comments:
The pages module is a great tool but I still find it limiting for creating sitemaps. It is possible that a page can also be listed twice, once as a standard weblog entry and once in the pages loop (like you have above). This would result in duplicate content in your sitemap pointing to two different urls.
To avoid duplicate urls you may need to use show_pages=“no” as a parameter in your other weblog entry loops in your sitemap file.
My extension LG Better Meta also has a site map generator that allows more refined control over what is shown in your sitemap and how it is ranked.
By Leevi Graham on Feb 23, 2009 - 08:56 PM
