You need to first general class using model builder. It will generate class companyDashboard.cs
public class CompanyDashboardController : Umbraco.Web.Mvc.RenderMvcController
{
public override ActionResult Index(ContentModel model)
{
// Do some stuff here, then return the base method
// model.Content will have iPublishedContent from companyDashboard
return base.Index(model);
}
}
Thanks for the tip but i am actually not using the model builder , i am not sure if it`s support on V8 of umbraco, i am actually using Entity Framework for MVC so i am not sure if i can use the model builder package to do this? is it possible to use both for my Application?
Route Hijacking Issue
Hi all,
As i am fairly new to Umbraco, i seem to be having issues regarding route hijacking. I keep getting the below error when i am trying to achieve this:
Cannot bind source type Umbraco.Web.Models.ContentModel to model type Test.Company.
So, below are the details regarding my code:
Model(Company.cs):
Controller(companyDashboardController.cs):
}
My View(companyDashboard.cshtml):
I have included the part which i think is causing the error to be generated.
Also, i have a document type of the same name (i.e companyDashboard) in Umbraco as well.
Can anyone please help me with this issue?
Thanks, Harry.
You need to first general class using model builder. It will generate class companyDashboard.cs
public class CompanyDashboardController : Umbraco.Web.Mvc.RenderMvcController { public override ActionResult Index(ContentModel model) { // Do some stuff here, then return the base method // model.Content will have iPublishedContent from companyDashboard return base.Index(model); } }
Hi Digitally,
Thanks for the tip but i am actually not using the model builder , i am not sure if it`s support on V8 of umbraco, i am actually using Entity Framework for MVC so i am not sure if i can use the model builder package to do this? is it possible to use both for my Application?
Thanks, Harry.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.