Wiki source code of #if ($doc.fullName == $blogCategorySheet)$services.localization.render('xe.blog.categories.sheet')#else$doc.name#end
Version 1.1 by Ludovic Dubost on 2017/01/07 20:30
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{include reference="Blog.CategoriesCode"/}} | ||
2 | |||
3 | {{velocity}} | ||
4 | #set ($discard = $xwiki.ssx.use("Blog.ManageCategories")) | ||
5 | #set ($discard = $xwiki.jsx.use("Blog.ManageCategories")) | ||
6 | #set ($obj = $doc.getObject($blogCategoryClassname)) | ||
7 | #if ($obj) | ||
8 | #getEntriesForCategory($doc.fullName $discard $totalEntries) | ||
9 | = Category: $services.rendering.escape($obj.getValue('name'), $doc.syntax) ($totalEntries posts) [[#toolImage('feed')>>Blog.CategoryRss||queryString="xpage=plain&category=$escapetool.url($doc.fullName)" title="RSS"]] = | ||
10 | {{html wiki=true}} | ||
11 | ## Keep testing the inline action for backward compatibility with older categories. | ||
12 | #if ($xcontext.action != 'edit' && $xcontext.action != 'inline') | ||
13 | {{include reference="Blog.CreatePost"/}} | ||
14 | |||
15 | #getCategoriesHierarchy($doc.space $tree) | ||
16 | #if ("$!tree.get($doc.fullName)" != '') | ||
17 | (% class="blog-categories-list subcategories" %) | ||
18 | ((( | ||
19 | ((( | ||
20 | **Subcategories** | ||
21 | ))) | ||
22 | ((( | ||
23 | #displayCategoriesHierarchyRecursive($tree $doc.fullName 1 'simple') | ||
24 | ))) | ||
25 | ))) | ||
26 | #end | ||
27 | (% class="clearfloats" %)((())) | ||
28 | |||
29 | #getEntriesForCategory($doc.fullName $entries $totalEntries) | ||
30 | #if ($totalEntries == 0) | ||
31 | {{info}}{{translation key="xe.blog.categories.noentries"/}}{{/info}} | ||
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 | {{/html}} | ||
40 | #elseif ($doc.fullName == $blogCategorySheet) | ||
41 | {{translation key="xe.blog.categories.sheetmessage"/}} | ||
42 | #else | ||
43 | {{warning}}{{translation key="xe.blog.categories.notcategory"/}}{{/warning}} | ||
44 | #end | ||
45 | {{/velocity}} |