Using this tutorial (viewtopic.php?f=8&t=7173) to generate dynamic sitemaps, I implemented the following code in sitemap.php, which is hosted under "http://example.com/sitemap":
The code works and the sitemap gets generated, however, there are quite some pages missing.
I used to generate the sitemap manually with https://www.xml-sitemaps.com/ and I count quite a large mismatch. Obviously pages that are not CouchCMS-generated on the domain will not show up, but important pages like "http://example.com/blog" are missing. I think mainly the blog-category listings (organized in folders) are not present.
Any idea if it is possible to include those?
Also is it possible to exclude the globals.php template (http://example.com/globals/)?
- Code: Select all
<?php require_once( 'cmsadmin/cms.php' ); ?>
<cms:content_type 'text/xml' /><cms:concat '<' '?xml version="1.0" encoding="' k_site_charset '"?' '>' />
<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">
<cms:templates order='asc' >
<cms:pages masterpage=k_template_name>
<url>
<loc><cms:show k_page_link /></loc>
<lastmod><cms:date "<cms:if k_page_modification_date='0000-00-00 00:00:00'><cms:show k_page_date /><cms:else /><cms:show k_page_modification_date /></cms:if>" format='Y-m-d\TH:i:s+00:00' gmt='1' /></lastmod>
</url>
</cms:pages>
</cms:templates>
</urlset>
<?php COUCH::invoke(); ?>
The code works and the sitemap gets generated, however, there are quite some pages missing.
I used to generate the sitemap manually with https://www.xml-sitemaps.com/ and I count quite a large mismatch. Obviously pages that are not CouchCMS-generated on the domain will not show up, but important pages like "http://example.com/blog" are missing. I think mainly the blog-category listings (organized in folders) are not present.
Any idea if it is possible to include those?
Also is it possible to exclude the globals.php template (http://example.com/globals/)?