Issue and patch attached. Please have a look. http://support.castleproject.org/projects/MR/issues/view/MR-ISSUE-515
On Jan 20, 10:18 pm, "Martin Nilsson" <[email protected]> wrote: > I need a feature to be able to prioritize registered view engines of the > same type. More concrete. > > In DefaultViewEngineManager.ResolveEngine(String templateName, bool > throwIfNotFound) it should pick the view engine with highest priority. So > more than one can have this template registered. Below code in ResolveEngine > does not guarantee a specific order: > > foreach(IViewEngine engine in viewEnginesFastLookup.Keys) > { > if (engine.HasTemplate(templateName)) return engine; > > } > > Note: all of the engines is of the same type (Brail in my case) but one > store the templates in files system (default), one is storing in database, > one in memory (for preview). > The story behind this is that it should be possible to design the site in > VS, then add those to the database so the user can change the site from > admin application. > > So what I want is to add a property on the IViewEngine called something like > Priority and then use that when resolving. > > * But this will break the interface thou and is that ok? * > > The logic for old systems will not be changed thou because they will get > priority 0 default and then that engine is used. But I can change the > priority in my config. > > Can I submit a patch for this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Development List" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en -~----------~----~----~----~------~----~------~--~---
