Ejemplo n.º 1
0
        public ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache,
                                                bool useDeepPaths)
        {
            var engines = _nullEngines;

            if (partialViewName.StartsWith("/") || partialViewName.StartsWith("~"))
            {
                engines = BareEngines();
            }
            else if (_workContext.GetCurrentTheme() != null)
            {
                engines = useDeepPaths ? DeepEngines(_workContext.GetCurrentTheme()) : ShallowEngines(_workContext.GetCurrentTheme());
            }

            return(engines.FindPartialView(controllerContext, partialViewName, useCache));
        }