Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > googlesitemap.xml only lists pages with default culture/language View modes: 
User avatar
Member
Member
patrick.ritschard-vtx-telecom - 3/21/2011 4:37:24 AM
   
googlesitemap.xml only lists pages with default culture/language
Hello,

how can I generate the googlesitemap for all used cultures&languages?

Only pages with the default language get listed...

Thanks in advance for your help

Pat

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 3/22/2011 4:24:04 AM
   
RE:googlesitemap.xml only lists pages with default culture/language
Hello Pat,

This can be done by specifying the CultureCode parameter for the underlying control that loads and renders the data (based on ordinary repeater).

Typically in ~\CMSPages\GoogleSiteMap.aspx, you could add ##ALL## macro like:

<cms:GoogleSitemap runat="server" ID="googleSitemap" TransformationName="CMS.Root.GoogleSiteMap" CacheMinutes="0" OrderBy="NodeLevel, NodeOrder, NodeName" CultureCode="##ALL##" />

or optionally use specific culture code other than the default and CombineWithDefaultCulture="true" parameter in case you have only two cultures you want to display.

Hope this will help.

Regards,
Zdenek

User avatar
Member
Member
patrick.ritschard-vtx-telecom - 3/22/2011 6:50:09 AM
   
RE:googlesitemap.xml only lists pages with default culture/language
Hello Zdenekc,

thanks for your reply. I'll try if I can modify the aspx file. ;)

cheers
Pat

User avatar
Member
Member
patrick.ritschard-vtx-telecom - 3/22/2011 7:31:30 AM
   
RE:googlesitemap.xml only lists pages with default culture/language
Hello Zdenekc,

I first tried:
<cms:GoogleSitemap runat="server" ID="googleSitemap" TransformationName="CMS.Root.GoogleSiteMap" CacheMinutes="0" OrderBy="NodeLevel, NodeOrder, NodeName" CultureCode="de-ch" CombineWithDefaultCulture="true"/>

result: only german links in sitemap, but no french (default culture is "ch-fr")
-> http://www2.smartphone.ch/googlesitemap.xml

adding CultureCode="##ALL##" to above code, only returns french links.

As I am a .NET newby...did I forget something?

Thanks in advance for your help

Best regards,
Pat

User avatar
Member
Member
Patrick - 3/22/2011 9:32:20 AM
   
RE:googlesitemap.xml only lists pages with default culture/language
I can answer my question myself...

adding CultureCode="##ALL##" to GoogleSiteMap.aspx

and set CombineWithDefaultCulture="false" in Settings/Website

as described here:
http://devnet.kentico.com/Knowledge-Base/Web-parts---Controls/Multilingual-Google-site-map.aspx

User avatar
Member
Member
Patrick - 3/24/2011 3:33:37 AM
   
RE:googlesitemap.xml only lists pages with default culture/language
Hello Zdenekc,

after implementing the mods you proposed, I have another problem.

There are many double entries in the sitemap for both used languages, and the"root" document is not listed at all (smartphone.ch/) , but only sub-pages (Sitemap: http://www2.smartphone.ch/googlesitemap.xml)

Furthermore I need to include all links to our product related PDF, which are in the media library.

Could you please give me a hint?

Thanks
Pat

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 4/5/2011 11:45:01 AM
   
RE:googlesitemap.xml only lists pages with default culture/language
Hello Pat,

To summarize what I wrote in the ticket:

##ALL## cultures macro and CombineWithDefaultCulture set to "false" produces duplicate results, when the document URLs are not different for each language version.
This means either with "Use name path for URL path" setting enabled (devguide/url_format_and_configuration) or enabled "Use custom URL path" and populated in document Properties / URLs.

The KB article you are linking to is for 4.0 version, where ordinary CMSRepeater instead of the special control was used, which brings some differences.
This control used in current versions lists only CMS.MenuItem (Page) documents, not the "root" type.

You could modify the aspx page to use standard repeater, like:

<cms:CMSRepeater runat="server" ID="googleSitemapRepeater" TransformationName="CMS.Root.GoogleSiteMap" CacheMinutes="0" OrderBy="NodeLevel, NodeOrder, NodeName" ClassNames="cms.menuitem;cms.root" CultureCode="de-ch" CombineWithDefaultCulture="true" FilterOutDuplicates="true" />

Multiple classnames takes root to the result and attribute FilterOutDuplicates filters out duplicate records if present,... however, different language versions are not duplicate records...so this has no effect.

I suppose you would need to use different paths for different language versions of the documents if you want to list all documents in each language version.

It would be also possible to modify the data of the repeater in codebehind to remove duplicate items.

Listing the files from Media library is another thing... and the codebehind will be most probably needed.
You can use the Data Sources / Media files data source webpart to get the records from media library and filter them to get just the PDFs.
Or if the PDFs are attachments to your documents, you may need to use nested control in the transformation to get the media library file info...

Rendering can be done by (Basic)Repeater and appropriate transformation. The datasource - repeater scenario is described here for Portal template, however it can be used in ASPX page as well (similarly like the cmsrepeater).

You could put more repeaters (listing webparts or controls) in proper order in the aspx page to list the items in the googlesitemap output according your aim.

Hope this gives you some clues to get it working as you need.

Regards,
Zdenek

User avatar
Member
Member
dbaird-myus - 8/13/2011 4:45:42 PM
   
Ver 5.5 R2 multilingual sitemap wanted - CMS.Sitemap and GoogleSitemap only rendering default language
We have a related problem. However, we're using the latest version v5.5.4191 R2.

OUR SETTINGS - We have the following settings (sharing these in case they are relevant):

- Yes to Combine default language in Sitemanager (this is desired by us so we can't just change it to enable a multilingual sitemap)

- Yes to Both Friendly and Extensionless URLs

- Because we wanted language (EN/ES, etc) to display in the URL we have setup directories in our menu tree for each language and set the "Custom URL Path" for each page/language combination (e.g. the document named "page" has a custom URL path of "/en/page" for EN and "/es/page" for Spanish.

===OUR ISSUE===
We have both a Page with the CMS Sitemap for regular site visitors.
Plus we have the googlesitemap.xml set in sitemanager
BOTH DISPLAY FINE except for the following PROBLMES:

1) Both only display the default language (EN) and we'd like to display both EN and other languages (assuming of course the page has been tranlsated). Please advise how to do that for BOTH CMS Sitemap and GoogleSiteMap.XML and if there is any sort of control they both use that would make this easier.

2) We have easily been able to select the other content types (e.g. CMS.News etc) for the CMS SiteMap ...and these display just fine. However, they are still not displaying on the GoogleSiteMap.
Can you confirm that we are going to have to configure GoogleSiteMap.XML to ALSo display more than just Page(MenuItem) types (meaning it won't inherit or observe the settings from CMS SiteMap)? We have the article on how to do it but we were hoping to avoid having to do this in both CMS SiteMap and Googlesitemap ... also not sure this article applies to 5.5.R2 http://devnet.kentico.com/Knowledge-Base/Web-parts---Controls/How-to-use-integrated-google-site-map-page.aspx

It would be nice if the GoogleSiteMap.XML and CMS.SiteMap could work together instead of having to configure them both separately. If thats possible, please advise.


User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 8/16/2011 10:41:08 AM
   
RE:Ver 5.5 R2 multilingual sitemap wanted - CMS.Sitemap and GoogleSitemap only rendering default language
Hello,

The controls are partly of different nature and their settings are independent, therefore it's currently not easily possible to change their behavior from single place.

1) Have you specified any culture settings in the googlesitemap.aspx page? Could you please post your definition here? It should display all culture versions.

2) The mentioned article still applies. To display more document types, you will need to modify the abovementioned file. As suggested in my previous post(s), using a standard CMS repeater is an alternative way to use more specific settings.

Thanks for any further info about your setup.

Regards,
Zdenek C.

User avatar
Member
Member
Patrick - 8/17/2011 1:26:34 AM
   
RE:Ver 5.5 R2 multilingual sitemap wanted - CMS.Sitemap and GoogleSitemap only rendering default language
Hello,

here's what we are using in our googlesitemap.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GoogleSiteMap.aspx.cs" Inherits="CMSPages_GoogleSiteMap"
ContentType="text/xml" %><?xml version="1.0" encoding="UTF-8" ?>
<urlset 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"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<cms:CMSRepeater runat="server" ID="googleSitemapRepeater" TransformationName="CMS.Root.GoogleSiteMap" CacheMinutes="0" OrderBy="NodeLevel, NodeOrder, NodeName" ClassNames="cms.menuitem" CultureCode="##ALL##" FilterOutDuplicates="true"/>
</urlset>

And in SiteManager/Settings:

Combine with default culture: true
Combine files with default culture: true

We really would like to get listed "PDF" files as well. Could you please post an exemple how I have to use the "CMS repeater" or how I have to alter the above code?

Regards,
Pat

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 8/21/2011 8:34:32 AM
   
RE:Ver 5.5 R2 multilingual sitemap wanted - CMS.Sitemap and GoogleSitemap only rendering default language
Hello Pat,

1. You would need to add the other document types into the ClassNames property like you can see on that Knowledge base article. For example:
<cms:CMSRepeater runat="server" ID="googleSitemapRepeater" TransformationName="CMS.Root.GoogleSiteMap" CacheMinutes="0" OrderBy="NodeLevel, NodeOrder, NodeName" ClassNames="cms.menuitem;cms.file" CultureCode="##ALL##" FilterOutDuplicates="true"/>

2. It displays the other cultures in the Site map only if the culture versions have different URLs. You can check the Live URL on document Properties in CMSDesk -> Content. You can ensure the unique URLs for the particular culture versions of the same document if you use custom Document URL path-s like: Languages and URLs.

Best regards,
Helena Grulichova