Пример #1
0
        /// <summary>
        /// 递归找到父节点
        /// </summary>
        private void LoopChannelMenu(StringBuilder strTxt, string urlKey, int category_id)
        {
            BLL.article_category bll = new BLL.article_category();
            int parentId             = bll.GetParentId(category_id);

            if (parentId > 0)
            {
                this.LoopChannelMenu(strTxt, urlKey, parentId);
            }
            HttpCookie cookie = HttpContext.Current.Request.Cookies["lang"];
            string     lang   = cookie != null ? cookie.Value : "pl-PL";

            if ("pl-PL".Equals(lang))
            {
                strTxt.Append("&nbsp;&gt;&nbsp;<a href=\"" + linkurl(urlKey, category_id, 1) + "\">" + bll.GetSeoTitle(category_id) + "</a>");
            }
            else
            {
                strTxt.Append("&nbsp;&gt;&nbsp;<a href=\"" + linkurl(urlKey, category_id, 1) + "\">" + bll.GetTitle(category_id) + "</a>");
            }
        }