Exam Area: Area 1 – Product Knowledge (15%)
Editors use several mechanisms to locate content:
| Method | How to access |
|---|---|
| Page Tree | Left panel → Page Tree tab |
| Search bar | Top of the navigation panel → type content name |
| Shortcut | Gadget → Recently edited / Favourites |
| Media Library | Left panel → Media tab |
Navigation panel search bar:
→ Type content name (partial match supported)
→ Shows matching pages, blocks, and media
→ Click result to navigate to that content
Search limitations in Edit View:
/episerver/cms/admin → Reports
| Report | Description |
|---|---|
| Link Status | Lists pages with broken internal or external links |
| Link Status (External) | Broken external links only |
| Linked to this page | Which pages link to the selected page |
| Changed by user | Content changed by a specific user |
| Unpublished content | Drafts not yet published |
| Expiring content | Content with a set expiry date |
// Resolve a URL to a content item
public class UrlLookupService
{
private readonly IUrlResolver _urlResolver;
public UrlLookupService(IUrlResolver urlResolver)
{
_urlResolver = urlResolver;
}
public IContent FindByUrl(string url)
{
// Returns the routed content or null
return _urlResolver.Route(new UrlBuilder(url));
}
}
// ContentReference(id, workId, providerName)
var contentRef = new ContentReference(42); // Page ID 42
var page = _contentLoader.Get<PageData>(contentRef);
// Get all instances of a specific content type
public class ContentFinderService
{
private readonly IContentModelUsage _contentModelUsage;
private readonly IContentLoader _contentLoader;
public ContentFinderService(
IContentModelUsage contentModelUsage,
IContentLoader contentLoader)
{
_contentModelUsage = contentModelUsage;
_contentLoader = contentLoader;
}
public IEnumerable<ArticlePage> GetAllArticlePages()
{
var contentType = typeof(ArticlePage);
// GetLocalUsages returns all content items of this type
var usages = _contentModelUsage.ListContentOfContentType(
_contentLoader.GetContentType(contentType));
return usages
.Select(u => _contentLoader.Get<IContent>(u.ContentLink))
.OfType<ArticlePage>();
}
}
// Get all pages under a specific root
public IEnumerable<IContent> GetAllUnderRoot(ContentReference root)
{
var descendants = _contentLoader.GetDescendents(root);
return descendants
.Select(d => _contentLoader.Get<IContent>(d))
.Where(c => c is PageData);
}
// Find all registered content types
public class ContentTypeListService
{
private readonly IContentTypeRepository _contentTypeRepo;
public ContentTypeListService(IContentTypeRepository contentTypeRepo)
{
_contentTypeRepo = contentTypeRepo;
}
public IEnumerable<ContentType> GetAllPageTypes()
{
return _contentTypeRepo
.List()
.Where(ct => typeof(PageData).IsAssignableFrom(ct.ModelType));
}
}
// Full-text search across all content (requires EPiServer.Find)
var results = _searchClient.Search<PageData>()
.For("EPiServer CMS")
.Filter(p => p.Language.Name.Match("en"))
.OrderByDescending(p => p.Changed)
.Take(10)
.GetResult();