public static string LoadNewsItem(string url, string img, string n, string intro) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("<div class=\"item-news\">\n"); stringBuilder.Append(" <div class=\"row\">\n"); if (img.ToString() != "") { stringBuilder.Append(" <div class=\"col-md-4\">\n"); stringBuilder.Append(string.Concat(new string[] { " <div class=\"img\"><a href=\"", url, "\" title=\"", n, "\"><img src=\"", img, "\" alt=\"", n, "\" class=\"img-thumbnail\" /></a></div>\n" })); stringBuilder.Append(" </div>\n"); } stringBuilder.Append(" <div class=\"col-md-8\">\n"); stringBuilder.Append(" <div class=\"detail\">\n"); stringBuilder.Append(string.Concat(new string[] { " <a href=\"", url, "\" title=\"", n, "\"><h2>", n, "</h2></a>\n" })); stringBuilder.Append(" <p>" + CMSfunc.CutString(CMSfunc.ClearHTMLTags(intro), 100) + "</p>"); stringBuilder.Append(string.Concat(new string[] { " <a href=\"", url, "\" title=\"", n, "\" class=\"btn btn-primary btn-sm\">", CMSfunc._Title("Detail"), "</a>\n" })); stringBuilder.Append(" </div>\n"); stringBuilder.Append(" </div>\n"); stringBuilder.Append(" </div>\n"); stringBuilder.Append("</div>\n"); return(stringBuilder.ToString()); }
public static string ClickDetail(string url) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("<div class=\"ClickDetail\"><a href=\"" + url + "\">"); stringBuilder.Append(string.Concat(new string[] { "<img src='", ApplicationSetting.URLImages, "/ic_mn.gif' border='0' align='absmiddle'> ", CMSfunc._Title("Detail"), "</a> </div>" })); return(stringBuilder.ToString()); }
public static string LoadPath(int p, int id) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("<ul>"); int p_From_Code = ModControl.GetP_From_Code("Home"); stringBuilder.Append(string.Concat(new string[] { " <li><a title=\"", ModControl.GetModField("Title", p_From_Code), "\" href=\"", VirtualPathUtility.ToAbsolute("~/"), "\">", CMSfunc._Title("home"), "</a></li>" })); if (ModControl.GetOldP(ModControl.GetOldP(p)) != 0) { int oldP = ModControl.GetOldP(ModControl.GetOldP(p)); string text = VirtualPathUtility.ToAbsolute("~/" + ModControl.GetModCode(oldP) + ".htm"); stringBuilder.Append(string.Concat(new string[] { " <li><a title=\"", ModControl.GetModField("Name", oldP), "\" href=\"", text, "\">", ModControl.GetModField("Name", oldP), "</a></li>" })); } if (ModControl.GetOldP(p) != 0) { int oldP2 = ModControl.GetOldP(p); string text = VirtualPathUtility.ToAbsolute("~/" + ModControl.GetModCode(oldP2) + ".htm"); stringBuilder.Append(string.Concat(new string[] { "<li><a title=\"", ModControl.GetModField("Name", oldP2), "\" href=\"", text, "\">", ModControl.GetModField("Name", oldP2), "</a></li>" })); } if (p != 0) { string text = VirtualPathUtility.ToAbsolute("~/" + ModControl.GetModCode(p) + ".htm"); stringBuilder.Append(string.Concat(new string[] { "<li><a title=\"", ModControl.GetModField("Name", p), "\" href=\"", text, "\">", ModControl.GetModField("Name", p), "</a></li>" })); } stringBuilder.Append("</ul>"); return(stringBuilder.ToString()); }