I have a page with two properties that use the same local block ArticlePageFilterBlock:
[Display(
Name = "Overview Definition",
Description = "Defines overview parameters",
GroupName = SystemTabNames.Content,
Order = 1)]
public virtual ArticlePageFilterBlock OverviewDefinition { get; set; }
[Display(
Name = "Render filter",
Description = "Defines which elements are to be shown in the overview list.",
GroupName = SystemTabNames.Content,
Order = 2)]
public virtual ArticlePageFilterBlock RenderFilter { get; set; }
The first has properties which should not be localizable, so not have the CultureSpecific attribute. But the second should be localizable. Is that possible?
Here is that block:
[UsedImplicitly]
[ContentType(DisplayName = "ArticlePageFilterBlock",
GUID = "35AC1BED-64CA-44D4-878C-89B479F09F04",
Description = "Enables configuration of filtering and sorting of the list of articles",
AvailableInEditMode = false)]
public class ArticlePageFilterBlock : BlockData, ITeaserItem, ISliderArticle
{
[Display(
Name = "Categories A (OR)",
Description = "Content categories which should be connected by OR",
Order = 10)]
[ArticleCategories]
[CultureSpecific]
public virtual IList<ContentReference> CategoriesOr { get; set; }
[Display(
Name = "Categories B (AND)",
Description = "Content categories which should be connected by AND",
Order = 20)]
[ArticleCategories]
[CultureSpecific]
public virtual IList<ContentReference> CategoriesAnd { get; set; }
[Display(
Name = "Authors",
Description = "Authors",
Order = 30)]
[AllowedTypes(typeof(PersonBlock))]
[CultureSpecific]
public virtual IList<ContentReference> Authors { get; set; }
public Func<ArticlePage.ArticlePage, bool> GetFilter()
{
ArticlePageFilter articlePageFilter = new ArticlePageFilter(Authors, CategoriesOr);
return articlePageFilter.GetFilter();
}
}
So all these properties in the local block should be CultureSpecific only in the second property of the page that uses them.