SitemapMgr and Sitemap
Posted: Mon Sep 14, 2020 8:31 am
Hello!
How are you?
I'd like to know, have I problem with a Sitemap?
I'm not profi, I'm creating website by myself.
I need a sitemap that will display all text content pages (even if they are not in the menu).
1. My Cmsms is 2.2.14 - SitemapMgr 1.6.1
The site is multilingual (russian, ukrainian), root pages structure is:
- rus (section header) > subpages
- ukr (section header) > subpages
- error404 page
2. In the SitemapMgr module of the Site Admin menu in the tab "Pages" I wrote {Navigator template='cms_template:Sitemap Pages' show_all=1}
3. Then I created two different sitemap:
Sitemap-rus with Module tag {Navigator start_element='1.1' show_root_siblings='1'}
Sitemap-ukr with Module tag {Navigator start_element='2.1' show_root_siblings='1'}
4. Then I added in config.php file
$config['permissive_smarty'] = 1;
$config['root_url'] = 'https://www.astra-net.com.ua';
4. Then I created in Design Manager "Templates" the SitemapMgr::Sitemap Pages with code
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{function name=Nav_sitemap}
{foreach $data as $node}
{page_attr key=searchable page=$node->id assign=isSearchable}
{if $node->type=='content' && !empty($isSearchable)}
<url>
<loc>{$node->url}</loc>
<lastmod>{$node->modified|date_format:'%Y-%m-%d'}</lastmod>
<changefreq>{math now=$smarty.now modified=$node->modified equation='(now-modified)/86400' assign='days'}{if $days < 2}hourly{elseif $days < 14}daily{elseif $days < 61}weekly{elseif $days < 365}monthly{else}yearly{/if}</changefreq>
<priority>{$level=$node->hierarchy|substr_count:'.'}{if $node->url|substr:0:-1 == {root_url}}1{elseif $level == '0'}0.8{elseif $level == '1'}0.6{elseif $level == '2'}0.4{else}0.2{/if}</priority>
</url>
{/if}
{if isset($node->children)}{Nav_sitemap data=$node->children}{/if}
{/foreach}
{/function}
{if isset($nodes)}{Nav_sitemap data=$nodes}{/if}
</urlset>
5. I added in google console sitemap.xml. But Google says, the page is indexed, but it is not in the Sitemap file
6. If I check sitemap.xml, it is indicated:
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.astra-net.com.ua/assets/sitemaps/sitemap-pages.xml</loc>
</sitemap>
<sitemap>
<loc>https://www.astra-net.com.ua/assets/sitemaps/sitemap-sitemap-rus.xml</loc>
</sitemap>
<sitemap>
<loc>https://www.astra-net.com.ua/assets/sitemaps/sitemap-sitemap-ukr.xml</loc>
</sitemap>
</sitemapindex>
All content pages are searchable and enabled.
See attaching files, please. Have I installed all the modules exactly? Should sitemap.xml display all pages of the site or I haven't any problems? Does sitemap.xml work correctly?
Where can I check it?
Thanks.
How are you?
I'd like to know, have I problem with a Sitemap?
I'm not profi, I'm creating website by myself.
I need a sitemap that will display all text content pages (even if they are not in the menu).
1. My Cmsms is 2.2.14 - SitemapMgr 1.6.1
The site is multilingual (russian, ukrainian), root pages structure is:
- rus (section header) > subpages
- ukr (section header) > subpages
- error404 page
2. In the SitemapMgr module of the Site Admin menu in the tab "Pages" I wrote {Navigator template='cms_template:Sitemap Pages' show_all=1}
3. Then I created two different sitemap:
Sitemap-rus with Module tag {Navigator start_element='1.1' show_root_siblings='1'}
Sitemap-ukr with Module tag {Navigator start_element='2.1' show_root_siblings='1'}
4. Then I added in config.php file
$config['permissive_smarty'] = 1;
$config['root_url'] = 'https://www.astra-net.com.ua';
4. Then I created in Design Manager "Templates" the SitemapMgr::Sitemap Pages with code
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{function name=Nav_sitemap}
{foreach $data as $node}
{page_attr key=searchable page=$node->id assign=isSearchable}
{if $node->type=='content' && !empty($isSearchable)}
<url>
<loc>{$node->url}</loc>
<lastmod>{$node->modified|date_format:'%Y-%m-%d'}</lastmod>
<changefreq>{math now=$smarty.now modified=$node->modified equation='(now-modified)/86400' assign='days'}{if $days < 2}hourly{elseif $days < 14}daily{elseif $days < 61}weekly{elseif $days < 365}monthly{else}yearly{/if}</changefreq>
<priority>{$level=$node->hierarchy|substr_count:'.'}{if $node->url|substr:0:-1 == {root_url}}1{elseif $level == '0'}0.8{elseif $level == '1'}0.6{elseif $level == '2'}0.4{else}0.2{/if}</priority>
</url>
{/if}
{if isset($node->children)}{Nav_sitemap data=$node->children}{/if}
{/foreach}
{/function}
{if isset($nodes)}{Nav_sitemap data=$nodes}{/if}
</urlset>
5. I added in google console sitemap.xml. But Google says, the page is indexed, but it is not in the Sitemap file
6. If I check sitemap.xml, it is indicated:
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.astra-net.com.ua/assets/sitemaps/sitemap-pages.xml</loc>
</sitemap>
<sitemap>
<loc>https://www.astra-net.com.ua/assets/sitemaps/sitemap-sitemap-rus.xml</loc>
</sitemap>
<sitemap>
<loc>https://www.astra-net.com.ua/assets/sitemaps/sitemap-sitemap-ukr.xml</loc>
</sitemap>
</sitemapindex>
All content pages are searchable and enabled.
See attaching files, please. Have I installed all the modules exactly? Should sitemap.xml display all pages of the site or I haven't any problems? Does sitemap.xml work correctly?
Where can I check it?
Thanks.