Esempio n. 1
0
        protected MetaInfo SetMeta(MetaInfo meta, string name = null, string categoryName = null, string brandName = null, string price = null, int page = 0)
        {
            var newMeta = meta != null ? (MetaInfo)meta.Clone() : MetaInfoService.GetDefaultMetaInfo(); // Creating new object to modify - keeping original Meta for cache

            if (page > 1)
            {
                newMeta.Title           += Resource.Client_Catalog_PageIs + page;
                newMeta.H1              += Resource.Client_Catalog_PageIs + page;
                newMeta.MetaDescription += Resource.Client_Catalog_PageIs + page;
            }

            SetMetaTags(MetaInfoService.GetFormatedMetaInfo(newMeta, name, categoryName, brandName, price));

            return(newMeta);
        }
Esempio n. 2
0
        protected void SetMeta(MetaInfo meta, string name)
        {
            MetaInfo newMeta = meta != null?meta.DeepClone() : MetaInfoService.GetDefaultMetaInfo();   // Creating new object to modify - keeping original Meta for cache

            SetMetaTags(MetaInfoService.GetFormatedMetaInfo(newMeta, name));
        }