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