views:

343

answers:

3

I just ran into trouble with the AreaDescriptionFilter of Spark using MVC 2 Beta.

The following line is from my Application.spark file. It results in the view engine looking in all possible locations of the view - except in the folders of the area "Shell".

# Html.RenderAction("ShowMainMenu", "Navigation", new { area = "Shell" });

Running the same action using http://localhost/Shell/Navigation/ShowMainMenu executes fine and recognizes the area's view directory as expected.

Any ideas how to fix this?

+1  A: 

There's a known bug with Spark and some of the render methods. Did you try grabbing the latest version of Spark directly from its source repository?

Haacked
scooby37
A: 

It requires a bit of code modification, but it's a relatively easy fix: Read the answer to a similar question here.

midas06
Thanks - I didn't see this post - but it's seem to be only a place to start looking in my case - details see below...
scooby37
A: 

Isn't there a case mismatch? Instead of area =

Html.RenderAction("ShowMainMenu", "Navigation", new { area = "Shell" });

you should have Area =

Html.RenderAction("ShowMainMenu", "Navigation", new { Area = "Shell" });
Frank Schwieterman
Actually it should be lowercase. All parameters like "controller", "action" and "id" are by convention lowercase.The problem was some kind of conflict between one of the preview versions of MVC2 and SparkViewEngine - it works fine now!
scooby37