Exemplo n.º 1
0
        public StoreLiquidResult GetCategoryPage(PageDesign pageDesign, Category category, String type)
        {
            var dic = new Dictionary <String, String>();

            dic.Add(StoreConstants.PageOutput, "");
            try
            {
                var contentCategory = new CategoryLiquid(category, type);

                object anonymousObject = new
                {
                    category = LiquidAnonymousObject.GetCategory(contentCategory)
                };

                var indexPageOutput = LiquidEngineHelper.RenderPage(pageDesign, anonymousObject);
                dic[StoreConstants.PageOutput] = indexPageOutput;
            }
            catch (Exception ex)
            {
                Logger.Error(ex, "GetCategoriesPartial");
            }

            var result = new StoreLiquidResult();

            result.LiquidRenderedResult = dic;
            result.PageDesingName       = pageDesign.Name;
            return(result);
        }