Ejemplo n.º 1
0
 /// <summary>
 /// Loads the navigation.
 /// </summary>
 private void LoadNavigation()
 {
     xmlDataSource.EnableCaching = false;
     xmlDataSource.CacheDuration = 0;
     RewriteService.AddRewriteNameSpaceForXslt(xmlDataSource);
     xmlDataSource.Data = PageMenuCache.GetPageMenu();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Loads the bread crumbs.
 /// </summary>
 private void LoadBreadCrumbs()
 {
     breadCrumbs = Store.Caching.CategoryCache.FetchCategoryBreadCrumbs(categoryId);
     xmlDataSource.EnableCaching = false;
     RewriteService.AddRewriteNameSpaceForXslt(xmlDataSource);
     xmlDataSource.Data = breadCrumbs.GetXml();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Adds the rewrite namespace so that it can be used from within XSLT.
        /// </summary>
        /// <param name="xmlDataSource">The XML data source.</param>
        public static void AddRewriteNameSpaceForXslt(XmlDataSource xmlDataSource)
        {
            if (_rewriteService == null)
            _rewriteService = new RewriteService();
              if (xmlDataSource.TransformArgumentList == null)
            xmlDataSource.TransformArgumentList = new XsltArgumentList();

              xmlDataSource.TransformArgumentList.AddExtensionObject("dc:urlRewrite", _rewriteService);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Adds the rewrite namespace so that it can be used from within XSLT.
        /// </summary>
        /// <param name="xmlDataSource">The XML data source.</param>
        public static void AddRewriteNameSpaceForXslt(XmlDataSource xmlDataSource)
        {
            if (_rewriteService == null)
            {
                _rewriteService = new RewriteService();
            }
            if (xmlDataSource.TransformArgumentList == null)
            {
                xmlDataSource.TransformArgumentList = new XsltArgumentList();
            }

            xmlDataSource.TransformArgumentList.AddExtensionObject("dc:urlRewrite", _rewriteService);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Loads the bread crumbs.
        /// </summary>
        private void LoadBreadCrumbs()
        {
            CategoryCollection category = Store.Caching.CategoryCache.FetchAssociatedCategoriesByProductId(productId);

            if (category != null && category.Count > 0)
            {
                DataSet breadCrumbs = Store.Caching.CategoryCache.FetchCategoryBreadCrumbs(category[0].CategoryId);
                xmlDataSource.EnableCaching = false;
                RewriteService.AddRewriteNameSpaceForXslt(xmlDataSource);
                xmlDataSource.Data = breadCrumbs.GetXml();
            }
            else
            {
                categoryCrumbs.Visible = false;
            }
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Contents the page URL.
 /// </summary>
 /// <param name="pageId">The page id.</param>
 /// <param name="userFriendlyName">Name of the user friendly.</param>
 /// <returns></returns>
 public string ContentPageUrl(string pageId, string userFriendlyName)
 {
     return(RewriteService.BuildContentPageUrl(pageId, userFriendlyName));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Catalogs the URL.
 /// </summary>
 /// <param name="categoryId">The category id.</param>
 /// <param name="userFriendlyName">Name of the user friendly.</param>
 /// <param name="additionalQueryStrings">The additional query strings.</param>
 /// <returns></returns>
 public string CatalogUrl(string categoryId, string userFriendlyName, string additionalQueryStrings)
 {
     return(RewriteService.BuildCatalogUrl(categoryId, userFriendlyName, additionalQueryStrings));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Catalogs the URL.
 /// </summary>
 /// <param name="categoryId">The category id.</param>
 /// <param name="userFriendlyName">Name of the user friendly.</param>
 /// <returns></returns>
 public string CatalogUrl(string categoryId, string userFriendlyName)
 {
     return(RewriteService.BuildCatalogUrl(categoryId, userFriendlyName));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Products the URL.
 /// </summary>
 /// <param name="productId">The product id.</param>
 /// <param name="userFriendlyName">Name of the user friendly.</param>
 /// <returns></returns>
 public string ProductUrl(string productId, string userFriendlyName)
 {
     return(RewriteService.BuildProductUrl(productId, userFriendlyName));
 }