Jeff-Lewis / nhaml

Automatically exported from code.google.com/p/nhaml
0 stars 0 forks source link

Buit-in partial template search should be consistent with MVC's RenderPartial search #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

When calling a built-in partial through MVC the ViewEngine searches 
PartialViewLocationFormats. This is configured so in NHamlMvcViewEngine:
"~/Views/{1}/{0}.haml",
"~/Views/Shared/{0}.haml"

Doing the same call though buil-in mechanism ( _ MyParial) searches in the 
same controller's view folder but not in the shared folder. Instead, It 
searches in the "~/Views/{0}.haml".

I would make both mechanisms consistent so that they search for templates 
in the same folders, probably sharing the same configuration for both 
mechanisms.

Regards.

Original issue reported on code.google.com by germanft...@gmail.com on 10 Nov 2008 at 4:18

GoogleCodeExporter commented 9 years ago

Original comment by lanwin...@gmail.com on 10 Nov 2008 at 5:50

GoogleCodeExporter commented 9 years ago

Original comment by andrew.j...@gmail.com on 18 Nov 2008 at 10:08

GoogleCodeExporter commented 9 years ago
Perhaps it has changed in later releases, but in the past, partial views had to 
be prefixed with an underscore. It'd be nice to not need the underscore.

Original comment by jessica....@gmail.com on 23 Apr 2009 at 4:52

GoogleCodeExporter commented 9 years ago
The underscore is need to make the different between partial view and 
layout(master).

Original comment by lanwin...@gmail.com on 23 Apr 2009 at 8:36