Our monthly Virtual Happy Hour is happening this week, Fri Feb 23!

Try our conversational search powered by Generative AI!

Application areas and episerver?

Vote:
 

I'd like to separate a big part of our code into an application area. What needs to be done to get this to work? At the moment if I create a pagetype model, a controller and a view episerver won't find my view because it's looking for it in ~/Views//Index.cshtml when it should look in ~/Area/Views//Index.cshtml My guessings are that I need to rewrite something in the AreaRegistration file that gets created when i create the Area but I'm not sure what.

#91526
Oct 08, 2014 9:53
Vote:
 

You'll probably need your own custom view engine where you add those conventions.

http://tedgustaf.com/blog/2012/11/conventions-for-episerver-7-mvc-views/ 

Frederik

#91528
Oct 08, 2014 10:41
Vote:
 

Thank you, that was very helpful.

Question: Do i need the area registration class thats generated when creating an application area?

#91529
Oct 08, 2014 11:12
Vote:
 

I guess only if you need the default routing to work (not EPiServer but ASP.NET routing). If you only have EPiServer content that requires routing then it should be fine without.

Frederik

#91530
Oct 08, 2014 11:16
Vote:
 

Just a side note. If you are using SignalR in your app - register Hub route before doing Area registration.

#91577
Oct 08, 2014 21:16
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.