public class MyRenderMvcController : IRenderMvcController
{
public void Execute(RequestContext requestContext)
{
throw new NotImplementedException();
}
public ActionResult Index(ContentModel model)
{
throw new NotImplementedException();
}
}
I think you should be able to do something like this:
public class InstallerComposer : ComponentComposer<InstallerComponent>
{
}
public class InstallerComponent : IComponent
{
public void Initialize()
{
ControllerBuilder.Current.SetControllerFactory(typeof(CultureinfoControllerFactory)); //I'm not sure about this bit of code here
}
public void Terminate()
{
}
}
However if you code needs to be in the equivalent of ApplicationStarting it would be worth having a read of these 3 blog posts:
How to register RenderControllerFactory in v8
Hi all.
Using Umbraco 8.1.1 and i wanna know how to register RenderControllerFactory.
In v7 i did this
But i guess i have to do it in an IUserComposer now, but how?
Maybe i should use IRenderMvcController but i dunno what to put inside the Index. https://our.umbraco.com/documentation/Reference/Routing/custom-controllers
Hi Bo,
I think you should be able to do something like this:
However if you code needs to be in the equivalent of ApplicationStarting it would be worth having a read of these 3 blog posts:
https://www.zpqrtbnk.net/posts/composing-umbraco-v8-components/ https://www.zpqrtbnk.net/posts/composing-umbraco-v8-collections/ https://www.zpqrtbnk.net/posts/composing-umbraco-v8/
Nik
Thanks Nik.
Your code snippet did the trick.
is working on a reply...