How to use SitemapMgr

  Previous article

How to use SitemapMgr

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.2.3.1
  Last updated: 15-11-2017
  Comments: 28
  http://cms.ms/3xZK

The SitemapMgr module creates page and module sitemap, robots.txt and humans.txt files.
Ready to use templates for several modules included in the Design Manager like News, CGBlog, Products, etc.

  How to use

1. After installation you will find the SitemapMgr module in the Site Admin menu.

2. The install process will automatically create:

  • www.website.com/robots.txt
  • www.website.com/sitemap.xml
  • www.website.com/assets/sitemaps/sitemap-pages.xml

Pre-existing humans.txt and robots.txt files are not overwritten, but the content is re-used in the module!

3. The humans.txt file is only created after you update the content and save it... If you don't want to use this feature after all, just empty the content and save... The file will be deleted.

4. By default there is a sitemap file created for content pages. In the tab "Sitemaps" you can create more sitemaps.

5. An internal cron job will recreate the sitemaps every 12 hour.

6. In the website root you will find the sitemap index file ( website.com/sitemap.xml ). It is a sitemap for sitemaps. Submit *only* this file to Bing, Google, or... No need to submit all individual sitemaps!

A2 Webhosting CMS Made Simple

Permissive Smarty
In order to calculate the change frequenty the SitemapMgr module uses a PHP function within Smarty.
You need to add the following line to your config.php file to let it work!

   $config['permissive_smarty'] = 1;

If not you get the error message: "PHP function xxx not allowed by security setting"


 Know issues and fixes

Protocol less URLs

By default CMS Made Simple 2.2 generates so called protocol less URLs. These are without http or https. The reason is to prevent mixed content with SSL-secured websites.

But in sitemaps they should be added...

Simple fix, add to your website's config.php file:

$config['root_url'] = 'http://www.website.com';

or:

$config['root_url'] = 'https://www.website.com';

And afterwards regenerate your sitemaps!

A2 Webhosting CMS Made Simple

 Additional sitemap templates

CGCalendar module

Module tag for CGCalendar module:

{CGCalendar display='upcominglist' listtemplate='cms_template:Sitemap CGCalendar'}

Uploads module

Create a new summary template in the Uploads module Admin page, named "Sitemap Uploads" and copy-paste this content:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{foreach from=$items item=entry}
<url>
  <loc>{$entry->detailurl}</loc>
</url>
{/foreach}
</urlset>

Module tag for Uploads module:

{Uploads summarytemplate='Sitemap Uploads' count=1000}
A2 Webhosting CMS Made Simple

  Working example



A2 Webhosting CMS Made Simple

  Comments

  Click here to leave a comment






This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)
  « Enter the CAPTCHA code (lower case)

Your IP address will be stored on submit. I reserve the right to change or delete your response without notice!
In case of abuse your IP address will be blocked!


Can I have your attention for a moment?

Did this tutorial help you solving a problem at your (clients) website and it saved you many hours of work? Great!!
Consider buying Rolf a cup of coffee in return! [ Click here ]


  28 Comments

CMS Made Simple 2.2.3.1 - Tutorials, tips and tricks - CMSMS 2.2.3.1

How to use SitemapMgr

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.2.3.1
  Last updated: 15-11-2017
  Comments: 28
  http://cms.ms/3xZK

A2 Webhosting CMS Made Simple