Skip to content

Instantly share code, notes, and snippets.

@trnktms
Created February 26, 2024 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trnktms/048c19b4326266c1ecc2a1bc4bbb3c25 to your computer and use it in GitHub Desktop.
Save trnktms/048c19b4326266c1ecc2a1bc4bbb3c25 to your computer and use it in GitHub Desktop.
public class HeaderResolver : IComponentResolver
{
public int Order => -100;
private readonly IApiPublishedContentCache _apiPublishedContentCache;
public HeaderResolver(IApiPublishedContentCache apiPublishedContentCache)
{
_apiPublishedContentCache = apiPublishedContentCache;
}
public IPublishedContent ResolveContent(IPublishedContent content)
{
return _apiPublishedContentCache.GetByRoute("/site-data/page-frames/header/");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment