Languageswitching prototype pages without relativeContentPath

Hi everybody,

I’m currently working on an implementation in which we make extensive use of prototypepages. These pages do not have a content bean set by the relative content path. Instead, instances of the prototype only comprise of catalog components dragged on the page.

This is also a multi-lingual implementation. So, given an instance A(nl) in the Dutch sitemap under path “xxx.nl/over-a”, there is also another instance A(en) in the English sitemap under path “xxx.nl/en/about-a”.

Without having a sitemap relative content bean on the request, we can’t use switching logic by checking available translations of the content bean. The next best standardized approach is to use sitemapitemrefid’s. Keeping the id’s for “over-a” and “about-a” equal, allows a languageswitch to create a link to the same refid under the different mount.

However, the sitemap item it’s refid is in no way editable in the channel manager.

  • What do you advise me to do? My next best workaround is to make a LanguageSwitchComponent and have it traverse the request componenttree. Taking the contentbean from the first component (header) and asking that bean for its availabletranslations. However, this feels like way too much custom code for something really trivial.
  • Second, does this seem like a good feature addition to the CM to allow a webmaster to link sitemapitems and allow the languageswitch to automatically infer translations for requests without a content bean?

Thanks,
Brian

Note that you can set a primary document for a page. That would give you the relative content path and thus a content bean. Otherwise you would need a LanguageSwitchComponent.

You might consider filing an improvement request in our JIRA.