Wiki source code of Sheet for displaying blog categories
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{include document="Blog.CategoriesCode"/}} | ||
2 | |||
3 | {{velocity filter="none"}} | ||
4 | {{html clean="false" wiki="true"}} | ||
5 | $xwiki.ssx.use("Blog.ManageCategories")## | ||
6 | $xwiki.jsx.use("Blog.ManageCategories")## | ||
7 | ## | ||
8 | ## | ||
9 | ## | ||
10 | #if($doc.getObject($blogCategoryClassname)) | ||
11 | #getEntriesForCategory($doc.fullName $discard $totalEntries) | ||
12 | |||
13 | <h1>Category: #getCategoryName($doc) ($totalEntries posts) <a href="$xwiki.getURL('Blog.CategoryRss', 'view', "xpage=plain&category=${escapetool.url($doc.fullName)}")" title="RSS">#toolImage('feed' '[RSS]')</a></h1> | ||
14 | #if($xcontext.action != 'inline') | ||
15 | {{include document="Blog.CreatePost"/}} | ||
16 | #getCategoriesHierarchy($doc.space $tree) | ||
17 | #if("$!{tree.get(${doc.fullName})}" != '') | ||
18 | <div class="blog-categories-list subcategories"> | ||
19 | <div> | ||
20 | **Subcategories** | ||
21 | </div> | ||
22 | <div> | ||
23 | #displayCategoriesHierarchyRecursive($tree $doc.fullName 1 'simple') | ||
24 | </div> | ||
25 | </div> | ||
26 | #end | ||
27 | <div class="clearfloats"></div> | ||
28 | |||
29 | #getEntriesForCategory($doc.fullName $entries $totalEntries) | ||
30 | #if($totalEntries == 0) | ||
31 | #info('No entries in this category') | ||
32 | #else | ||
33 | #displayBlog($entries 'category' true true) | ||
34 | ## displayNavigationLinks requires a blog document, to determine how should the entries be split into pages. Return this | ||
35 | ## document, as the macro fallbacks to 'paginated' in case the right setting cannot be determined. | ||
36 | #displayNavigationLinks($doc) | ||
37 | #end | ||
38 | #end | ||
39 | #elseif($doc.fullName == $blogCategorySheet) | ||
40 | = $msg.get('xe.blog.categories.sheet') = | ||
41 | $msg.get('xe.blog.categories.sheetmessage') | ||
42 | #else | ||
43 | #warning($msg.get('xe.blog.categories.notcategory')) | ||
44 | #end | ||
45 | {{/html}} | ||
46 | {{/velocity}} |