I think this is a very basic and simple question... (I come from a Sitecore oriented workplace so please forgive me my dumbness if there isn't something like the Sitecore.Context class...)
How do I retrieve the Umbraco application- or website- context object from which I can retrieve Hives and other contextual data? (Or please tell me if I'm missing a point here...)
Please note:, I'm looking for a way to get this outside a controller.
I know that it's possible to get a IRoutableRequestContext inside a controller (like the code below taken from this site), but can I get it in a custom class from some static variable or something?
[Surface("b9c79cc7-cbdb-4df6-88ee-ce25c9a9c38d")]
public class BooksSurfaceController : SurfaceController
{
public BooksSurfaceController(IRoutableRequestContext requestContext)
: base(requestContext)
{
}
private ReadonlyGroupUnitFactory GetHiveReader()
{
return RoutableRequestContext.Application.Hive.GetReader(new Uri("v5-BooksExample://"));
}
}
Basic question to get started?
I think this is a very basic and simple question... (I come from a Sitecore oriented workplace so please forgive me my dumbness if there isn't something like the
Sitecore.Context
class...)How do I retrieve the Umbraco application- or website- context object from which I can retrieve Hives and other contextual data? (Or please tell me if I'm missing a point here...)
Please note:, I'm looking for a way to get this outside a controller.
I know that it's possible to get a
IRoutableRequestContext
inside a controller (like the code below taken from this site), but can I get it in a custom class from some static variable or something?is working on a reply...