U4-1651 - Allow MVC Views to exist in sub folders

Created by Shannon Deminick 05 Feb 2013, 22:39:25 Updated by Shannon Deminick 26 Jun 2017, 05:41:32

Is duplicated by: U4-2308

Is duplicated by: U4-2334

Relates to: U4-5441

Is required for: U4-2151

In order to accomplish this we would need to pass the full virtual URL of the view to the 'View' method in RenderMvcController. This would require storing this full virtual path in a custom DataToken in the RenderRouteHandler. We'd also then need to support storing this full path and update the UI in the back office to support this too.


Shannon Deminick 05 Sep 2014, 00:03:01

The thing about this feature is that it could muck around with normal MVC behavior since MVC uses naming conventions inside of the views folders to match which views should be rendered.

We can have partial views and partial view macros exist in sub folders (U4-5441) but having normal views exist in sub folders needs to be dealt with differently otherwise things can start to to get messy.

Of course if you hijack a route for any doc type, the naming convention for views can automatically be in sub folders based on the MVC controller name - since it's just normal MVC naming conventions.

Dan Booth 05 Sep 2014, 19:13:52

Personally I'd like to see the interface allow you to create and place partials in folders, but I don't really see much reason for this to apply to views. Being able to group and organise related partials would be a great help for larger projects (and, yes, I know you can already place them in folders but the back-end doesn't recognise them or allow you to create folders).

Shannon Deminick 08 Sep 2014, 08:00:31

Yes, partial views is already done and in a PR: http://issues.umbraco.org/issue/U4-5441

Shannon Deminick 26 Jun 2017, 05:41:32

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/

Priority: Normal

Type: Feature (request)

State: Closed

Assignee: Shannon Deminick

Difficulty: Normal

Category: Architecture

Backwards Compatible: False

Fix Submitted:

Affected versions: 4.10.0, 4.11.0, 6.0.0, 4.11.1, 4.11.2, 4.11.3, 4.11.4

Due in version:


Story Points: