Example #1
0
 /// <summary>
 /// Get the URL for a category
 /// </summary>
 /// <param name="category">The category to get the URL for</param>
 /// <returns>The URL if the category is valid, otherwise an emtpy string</returns>
 protected virtual string GetCategoryUrl(CategoryItem category)
 {
     if (category != null)
         return LinkManager.GetItemUrl(Sitecore.Context.Database.GetItem(category.ID));
     else
         return string.Empty;
 }
Example #2
0
        private void VerifyAllCategories(CategoryItem[] categories)
        {
            var ids = (from category in categories
                       select category.ID).ToArray();

            Assert.AreEqual(4, ids.Length);
            Assert.Contains(m_category1.ID, ids);
            Assert.Contains(m_category2.ID, ids);
            Assert.Contains(m_category3.ID, ids);
            Assert.Contains(m_category4.ID, ids);
        }