For a customer last week I spent a bit of time trying to get MLS and CTC4 playing together, which was harder than it might have been. I may be missing something, but here is what I did.
My set-up is WP22.214.171.124 with CTC 4. I set up the demo site by creating a base locale and 2 localized libraries. I also set up localization workflow and so on according to MLS documentation. That part all works a treat:
In my demo site I thought I’d use the Biographies template to explain what was going on, so I created a page using the biographies page template. The central area on the page is the list of content items that use the biographies template, all nicely created via page templating for me (with 1 addition during the demo):
This list is a “specified” WCM rendering portlet that points to a content item in the content library for the base locale, all of which is created when the page template is instantiated:
I added the context processor to the portlet configuration as per the MLS instructions:
The page template instantiation process creates a sub-structure of pages under the Biographies site area. These contain a number of site area that aren’t rendered but which are containers to keep content and configuration items organized.
The content items for biographies themselves live under the content site area and the Index List content item lives under the Components site area. The Index List content items is a fairly complex template that, in its entirety looks like this:
The MLS widget on the bottom of the content items shows the localizations that I created. This part works well and allows me to create localized versions of this content item. I needed to localize the Index List content items because it contains a context over-ride that points at the site area where the content items live:
The effect of this is that whatever the context processor does to try to switch context, the list item still points back to the en_GB library via the context over-ride.
As a result I had to do the following two things to successfully localize this page:
- Create localized content of the individual biography entries as per normal process
- Create a localized version of the Index List content item, and manually change the context override in each localized library
This pattern is repeated across the site – most of the CTC page templates use this approach with context overrides to force list components to render content from their sibling site area.
The issue I see with this is that in a site of any scale then you’ve got a whole load more content items to manage and update if you change aspects of your site design. That could get really cumbersome, so I’m hoping to find a simpler option.