修复显示地址问题。增加sitemap
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<ul class="sec-nav-list">
|
||||
@foreach (Article a in alist)
|
||||
{
|
||||
<li class="@(a.Id == Model.Id?"sec-on":"")"><a href="@ViewsHelper.EchoURL(k)" title="@a.Title">@a.Title</a></li>
|
||||
<li class="@(a.Id == Model.Id?"sec-on":"")"><a href="@ViewsHelper.EchoURL(a)" title="@a.Title">@a.Title</a></li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<ul class="sec-nav-list">
|
||||
@foreach (Article a in alist)
|
||||
{
|
||||
<li class="@(a.Id == Model.Id?"sec-on":"")"><a href="@ViewsHelper.EchoURL(k)" title="@a.Title">@a.Title</a></li>
|
||||
<li class="@(a.Id == Model.Id?"sec-on":"")"><a href="@ViewsHelper.EchoURL(a)" title="@a.Title">@a.Title</a></li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
@{
|
||||
Layout = null;
|
||||
ViewBag.title = "网站地图";
|
||||
ViewBag.keywords = "网站地图";
|
||||
ViewBag.description = "网站地图";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>SitemapHTML</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
<div class="banner mobile sec-banner">
|
||||
<em style="background: url('/images/default/slide-1.jpg') center top no-repeat; background-size: 100%;"></em>
|
||||
</div>
|
||||
<div class="banner normal sec-banner">
|
||||
<em style="background: url('/images/default/slide-1.jpg') center top no-repeat; background-size: 100%;"></em>
|
||||
</div>
|
||||
<div class="content au">
|
||||
<div class="au-bg">
|
||||
<div class="cont">
|
||||
@* 请自行将网站栏目显示于此 *@
|
||||
网站地图。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6,6 +6,12 @@
|
||||
IList<ArticleCategory> articleCategories = ArticleCategory.FindAll(ArticleCategory._.IsHide == 0, null, null, 0, 0);
|
||||
//前2000篇文章
|
||||
IList<Article> articles = Article.FindAll(Article._.IsHide == 0, null, null, 0, 2000);
|
||||
|
||||
//所有商品栏目
|
||||
IList<Category> productCategories = Category.FindAll(Category._.IsHide == 0, null, null, 0, 0);
|
||||
|
||||
//前2000个商品
|
||||
IList<Product> products = Product.FindAll(Product._.IsHide == 0, null, null, 0, 2000);
|
||||
}
|
||||
<url>
|
||||
<loc>@url</loc>
|
||||
@@ -15,7 +21,16 @@
|
||||
@foreach (var item in articleCategories)
|
||||
{
|
||||
<url>
|
||||
<loc>@(url)/article/index/@(item.Id)</loc>
|
||||
<loc>@(url)@(ViewsHelper.EchoURL(item))</loc>
|
||||
<priority>0.80</priority>
|
||||
<lastmod>@(lastmod)</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
}
|
||||
@foreach (var item in productCategories)
|
||||
{
|
||||
<url>
|
||||
<loc>@(url)@(ViewsHelper.EchoURL(item)))</loc>
|
||||
<priority>0.80</priority>
|
||||
<lastmod>@(lastmod)</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
@@ -24,7 +39,16 @@
|
||||
@foreach (var item in articles)
|
||||
{
|
||||
<url>
|
||||
<loc>@(url)/article/detail/@(item.Id)</loc>
|
||||
<loc>@(url)@(ViewsHelper.EchoURL(item)))</loc>
|
||||
<priority>0.80</priority>
|
||||
<lastmod>@(lastmod)</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
}
|
||||
@foreach (var item in products)
|
||||
{
|
||||
<url>
|
||||
<loc>@(url)@(ViewsHelper.EchoURL(item)))</loc>
|
||||
<priority>0.80</priority>
|
||||
<lastmod>@(lastmod)</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
|
||||
Reference in New Issue
Block a user