I'm working on a site with multiple languages. Some languages also have a different page-structure than others.
In order to not confuse editors too much, I would like to hide pages in the page tree that are in languages that the edior does not have rights to edit.
By default EPiServer display those pages grayed out, with a padlock. I don't want the editor to see them at all.
Example: A Swedish editor should see Swedish pages and the English pages, but the other languages should not be visible at all.
Is this possible?
But if you hide the page in the tree, then how you will translate the page?
My thought was that I will show pages in the language that the editor has access to (e.g. swedish), as well as the master language (en).
You could try to prepare a custom implementation of GetChildrenQuery class.
The GetContent method contains parameter of ContentQueryParameters type. And there is a informationsiotn about preffered culture.
Inside the method you need to filter the content based on ContentLanguage.PreferredCulture.
public class CustomGetChildrenQuery : GetChildrenQuery
public CustomGetChildrenQuery(IContentQueryHelper queryHelper, IContentRepository contentRepository, LanguageSelectorFactory languageSelectorFactory) : base(queryHelper, contentRepository, languageSelectorFactory)
public override int Rank
protected override IEnumerable<IContent> GetContent(ContentQueryParameters parameters)
var result = base.GetContent(parameters);
//ContentQueryParameters contains PreferredCulture
// here you should apply filters
// based on ContentLanguage.PreferredCulture (which is a current culture)