Skip to content

Feature Folders

Trevor Fayas edited this page Dec 31, 2021 · 3 revisions

Feature Folders are an organization structure that groups Views, Models and Controller/ViewComponent into a single folder, versus separating them into individual root folders (usually Controllers, Views, and Models).

This is accomplished through a CustomLocationExpander, detailed out in Dev Trev's Feature Folder blog article.

This adjustment is reverse compatible with standard View routing.

New Route paths will find Views under /Features/{ControllerName}/{ActionName}.cshtml

There are some other hard-coded paths, and you can customize as you wish. Many of the Views in my solution are hard-coded to ensure functionality regardless of usage of feature folder path expander.

Clone this wiki locally