Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Getting blogs and blog posts to appear in xml sitemap View modes: 
User avatar
Member
Member
andrew-gradweb.co - 2/7/2012 11:30:03 AM
   
Getting blogs and blog posts to appear in xml sitemap
Hi,

I have followed this tutorial for adding an xml site page to my website.

http://devnet.kentico.com/Knowledge-Base/Web-parts---Controls/How-to-use-integrated-google-site-map-page.aspx

As per these instructions I altered the classNames property in CMSPages/GoogleSiteMap.aspx:

<cms:GoogleSitemap runat="server" ID="googleSitemap" TransformationName="CMS.Root.GoogleSiteMap" CacheMinutes="0" OrderBy="NodeLevel, NodeOrder, NodeName" ClassNames="CMS.MenuItem; CMS.Blog; CMS.BlogPost" />

However even after doing this I only see pages in the site map. If I just have CMS.BlogPost in ClassNames then I do see some of the blog posts. I can't seem to get them both to appear at the same time.

Any advice or suggestions would be greatly appreciated.

Andrew.

User avatar
Member
Member
kentico_michal - 2/9/2012 2:20:35 AM
   
RE:Getting blogs and blog posts to appear in xml sitemap
Hello Andrew,

Kentico CMS's Google site map control displays tree structure. If there is some document in the path that is not included in the ClassNames property, all child document of that document are not displayed, even if they are specified in the ClassNames property. In other words, goole site map hides children documents if their parent is hidden.

I think this is your case, because there is always a document of CMS.BlogMonth document type between CMS.Blog and CMS.BlogPost that is not specified in the ClassNames property. And as a result, all child document (in this case documents of CMS.BlogPost) are not displayed.

So, to fix this issue, you need to specify all three blogs related document types in the ClassNames:

ClassNames="CMS.MenuItem;CMS.Blog;CMS.BlogPost;CMS.BlogMonth"

Anyway, there is a new property called HideChildrenForHiddenParent in Kentico CMS 6.0 that is intended exactly to deal with this limitation. If you set it to false (it is true by default) google site map displayes all documents that you need regardless of whether their parent is hidden or not.

Best regards,
Michal Legen

User avatar
Member
Member
andrew-gradweb.co - 2/9/2012 4:29:44 AM
   
RE:Getting blogs and blog posts to appear in xml sitemap
Hi Michal,

This does indeed fix my problem. Thank you very much for your help!

Regards,

Andrew.

User avatar
Member
Member
sini.sivasankaran-solarwinds - 5/25/2012 5:00:05 AM
   
RE:Getting blogs and blog posts to appear in xml sitemap
Where can I find the HideChildrenForHiddenParent property?

User avatar
Member
Member
kentico_edwardh - 5/25/2012 7:01:47 PM
   
RE:Getting blogs and blog posts to appear in xml sitemap
Hello,

You can find the HideChildrenForHiddenParent property in the GoogleSitemap class under CMS.Controls.GoogleSitemap.HideChildrenForHiddenParent

Best Regards,
Edward Hillard