public IContentBlocksPreset GetPresetForPage(int pageId, string culture)
        {
            if (string.IsNullOrEmpty(culture))
            {
                return(null);
            }

            string documentType = _documentTypeAliasProvider.GetDocumentTypeAlias(pageId);

            return(GetPresetForPage(documentType, culture));
        }
Пример #2
0
        public IEnumerable <IContentBlockDefinition> FilterForPage(IEnumerable <IContentBlockDefinition> definitions, int pageId, string culture)
        {
            if (string.IsNullOrEmpty(culture))
            {
                // A document type can be culture invariant, in that case nothing is filtered.
                return(definitions);
            }

            string documentType = _documentTypeAliasProvider.GetDocumentTypeAlias(pageId);

            return(FilterForPage(definitions, documentType, culture));
        }