Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
There has been a lot of topics for Umbraco in custom classes and I can't figure out the correct way to implement a static class (for extensions).
public static class CompositionExtensions
private static readonly IUmbracoContextFactory _context;
public static void SetUmbracoRoutes(this Composition composition)
var rootNodes = _context.EnsureUmbracoContext().UmbracoContext.ContentCache.GetByXPath("root/");
I saw some link to Lazy<> and LazyInitializer but did not get the context of how to actually implement it.
Any help would be great!
Found another solution by using IComponent
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted