How to use SitemapMgr
Previous article Next articleThe 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 24 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!
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
Include all pages in the sitemap
By default only content pages that are in the navigation are added to the sitemap. If you want to have all pages included, add the "show_all=1" parameter in the Navigator tag in the SitemapMgr Admin page.
You can still decide what page is included or not using the "searchable" checkbox at option tab in Content Manager.
Protocol less URIs
By default CMS Made Simple release 2.2 generated so called protocol less URIs. 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:
And afterwards regenerate your sitemaps!
Additional sitemap templates
CGCalendar module
Module tag for CGCalendar module:
Uploads module
Create a new summary template in the Uploads module Admin page, named "Sitemap Uploads" and copy-paste this content:
{foreach from=$items item=entry}
<url>
<loc>{$entry->detailurl}</loc>
</url>
{/foreach}
</urlset>
Module tag for Uploads module:
Working example
Comment Form
ReviewManager
ReviewManager
30 Comments
@ahoura
You should *not* have too!
Unless you use Uploads module, site map template is above.
What should I do for images on the site map?
this my website problem please check:
okakdipalembang.info/ assets/ sitemaps/sitemap-webs.xml
After applying multilingual module (MleCMS) I have problems with SitemapMgr. The thing is that the module creates "Empty" sitemaps. For example, for "Sitemap Pages" I have just:
"This XML file does not appear to have any style information associated with it. The document tree is shown below.
".
That's all.
Any ideas?
Thank you Rolf!
It works now.
I have many pdf files and images (with titles and descriptions) on my site's pages. How to make sitemap of such files?
P.S. This information may be useful. I've asked about the FileBackUp module before. The module doesn't work on PHP 7.0.0. We moved back to 5.6. It works now.
@Vasyl
You have to create a summary template in the *Uploads* module admin page!! The Uploads module isn't Design Manager ready yet...
In the Uploads module Admin page, in the top-right corner there is the button "Modify templates"!
Rolf,
I use CMSMS 2.2.1. When I go to: SiteAdmin -> SiteMapMGR - I see 3 tabs: Humans, Robots, Sitemaps, but I can't find that 'modify' button.
I try to create new "Sitemap Updates" by these steps:
1) I go to: Layout -> Design Manager -> "Templates" tab.
2) I press: Create a new Template
3) I chose Template Type: SitemapMGR::Sitemap Custom
4) Template Name: Sitemap Uploads
5) Code: From this page (above)
6) I press "subbmit' - it appears in the templates list
7) I go to: SiteAdmin -> SiteMapMGR -> "Sitemap" tab
8) Name: Uploads
9) Type: Sitemap Custom (there is no created "Sitemap Uploads" in the list)
10) I go to: "Uploads" tab
11) Use this code: {cms_module module='Uploads' summarytemplate='Sitemap Uploads' count=1000}
12) I get the error:
This page contains the following errors:
error on line 8 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.
@Vasyl
In the Uploads module Admin page, in the top-right corner is a button "Modify templates"
Thanks Rolf!
Could you please help with the Uploads module?
What does it mean: "Create a summary template" and where to find that summary template?
@Vasyl
Simply browser caching...
For other questions the CMSMS forum is the place to be!!
Rolf,
Thank you. It works now. Why does it happen I don't understand! Anyway. Thanks.
P.S. I have a really burning issue with 'FileBackUp' module. It can't work on the new host (we transferred the site). I can't reinstall it, and can't save the preferences. In both cases it 'trow me out' and this is the server response (on the blank page):
"This page isn’t working.
www.mysite.com is currently unable to handle this request."
Please, could you be welcome to assist in this case ether?
@Vasil
When you have the sitemap opened in the browser, reload/refresh the page CTRL F5 or CMD R
Rolf,
Thank you for your help. I did as you mentioned (added to config.php:
$config['root_url'] = 'http://www.mysite.com';
$config['permissive_smarty'] = 1;),
then deleted all sitemaps, and create new ones. However, this did not fix my problem. The UPLs remain the same e.g.: //mysite.com/index.php?page=partners
Interesting thing, this operations changed the link that is next to 'submit' 'cancel' buttons in the module's settings. It was like //mysite....... . Now it looks like http://www.misite......
Is there any I should do? Maybe some configuration settings in cmsms.
Confirmed, if you add the root_url parameter to the config.php file like I described below the correct URL is taken in the sitemaps *after* they have been recreated.
Indeed Vasyl, Google doesn't like the protocol less URLs in the sitemap...
@Vasyl
These are protocol less URLs, so they work with http and https. It is a CMSMS core feature, they should work...
But you could try to add to the config.php file:
$config['root_url'] = 'http://www.website.com';
Afterwards recreate the sitemaps by saving the tabs in SitemapMgr.
Please, help me!
Google can't accept my sitemaps due to the way links written in my sitemaps files. The module creates files with this form of writing:
//mysite.com/index.php?page=partners
2017-06-13
weekly
0.8
Coogle needs this form:
http://www.mysite.com/index.php?page=partners
How to fix this?
@Daniele
Glad it works for you now, and thanks for the coffee! Much appreciated.
Yeah, now it works! Thanks!
I've deactivate the page, saved and then reactivate the page.
@Daniele
Double check the page - that is not in the menu - is checked enabled and searchable!
It should come up in the XML sitemap after you changed the Navigator tag in SitemapMgr and you saved the sitemap tab (XML will be recreated!)
@Rolf I've refreshed browser with no luck. I've also cleared cache and url paths from admin panel.
If I add the new page to menu and press F5, I can see immediately the Url listed in XML file.
It's weird
@Daniele
When looking at the pages sitemap after the change, did you reload the browser? It probably is cached. So CMD R or CTRL F5 when looking at your sitemap in the browser. It works for sure, just checked!
@Rolf thank you, it works for html sitemap but the xml sitemap doesn't list it. If I add the page to menu, page is included in xml
@Daniele
Just add the show_all parameter in the module tag:
{cms_module module='Navigator' template='cms_template:Sitemap Pages' show_all=1}
Hello, great new module! If the page is not included in nav menù the sitemap doesn't list it . There's a way to include a page not inserted in menù?
@anonymxxx
Do you have added to your config.php file:
$config['permissive_smarty'] = 1;
That part was missing in the help text...
Installed on 2.1.6 and worked like a charm. Hooked up to a LISE instance with the default template provided and everything just worked. Thanks again, Rolf!
1. Has this sitemap the type Sitemap Pages?
2. Do you have regular content pages in the Content Manager enabled?
3. Are they checked "This page is searchable"?
4. Are they checked "Show in menu"?
Xml file not include page content..
Yeah of course browser page is white because inside tags xml is empty.
White page > Error 500 > Check Error Log server...
im try for sitemap cgblog is good but sitemap for content page not work (blank)/white page/empty data