文章管理
在前面的属性管理中,我们已经看见过了文章的分类了,默认情况下,搜索,分类列表,文章tag都是在一个模板页面里面的,相信大家在前台也已经看到过了。现在为了独立不同一个分类页面,分类支持分类页面定制和分类下的文章模板定制,是不是很强大?不仅如此,还支持分类的属性定义,扩展了文章限定字段的不足。来看看吧。
1. 分类模板
2. 文章
3. 模板分类代码
{{template "header.html" .}}
{{template "nav.html" .}}
{{template "bread.html" .}}
{{range .all}}
{{.Title}}
{{.Description}}
{{end}}
{{if le .page .pageCount}}
{{end}}
{{template "footer.html" .}}
{{template "js.html" .}}
4. 模板文章代码
{{template "header.html" .}}
{{template "nav.html" .}}
{{template "bread-article.html" .}}
{{.one.Content|Str2Html}}
{{.title}}
模板信息
描述:{{.Description}}
发布时间:
更新时间:
浏览数:{{.one.Views}}
标签
资源
{{range $k,$v := .ext}}
{{$k}}
{{end}}
{{template "footer.html" .}}
{{template "js.html" .}}