Last active
August 29, 2015 14:15
-
-
Save davidknipe/b4cc2c2ad2b5ab37e56d to your computer and use it in GitHub Desktop.
EPiServer Powerslice example slides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ServiceConfiguration(typeof(IContentQuery)), ServiceConfiguration(typeof(IContentSlice))] | |
public class PagesSlice : ContentSliceBase<StandardPage> | |
{ | |
public override string Name | |
{ | |
get { return "Pages"; } | |
} | |
} | |
[ServiceConfiguration(typeof(IContentQuery)), ServiceConfiguration(typeof(IContentSlice))] | |
public class ArticleSlice : ContentSliceBase<ArticlePage> | |
{ | |
public override string Name | |
{ | |
get { return "Articles"; } | |
} | |
public override IEnumerable<CreateOption> CreateOptions | |
{ | |
get | |
{ | |
var contentType = ContentTypeRepository.Load(typeof(ArticlePage)); | |
yield return new CreateOption(contentType.LocalizedName, ContentReference.StartPage, contentType.ID); | |
} | |
} | |
} | |
[ServiceConfiguration(typeof(IContentQuery)), ServiceConfiguration(typeof(IContentSlice))] | |
public class BlocksSlice : ContentSliceBase<SiteBlockData> | |
{ | |
public override string Name | |
{ | |
get { return "Blocks"; } | |
} | |
} | |
[ServiceConfiguration(typeof(IContentQuery)), ServiceConfiguration(typeof(IContentSlice))] | |
public class MediaSlice : ContentSliceBase<MediaData> | |
{ | |
public override string Name | |
{ | |
get { return "Media"; } | |
} | |
} | |
[ServiceConfiguration(typeof(IContentQuery)), ServiceConfiguration(typeof(IContentSlice))] | |
public class ImagesSlice : ContentSliceBase<ImageFile> | |
{ | |
public override string Name | |
{ | |
get { return "Images"; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment