Toggle navigation
Log-in
Wiki Index
Page Index
User Index
Application Index
Blog
CategorySheet
Wiki source code of
CategorySheet
Last modified by superadmin on 2016/07/29 17:18
Show line numbers
{{include reference="Blog.CategoriesCode"/}} {{velocity}} #set ($discard = $xwiki.ssx.use("Blog.ManageCategories")) #set ($discard = $xwiki.jsx.use("Blog.ManageCategories")) #set ($obj = $doc.getObject($blogCategoryClassname)) #if ($obj) #getEntriesForCategory($doc.fullName $discard $totalEntries) = Category: $services.rendering.escape($obj.getValue('name'), $doc.syntax) ($totalEntries posts) [[#toolImage('feed' '[RSS]')>>Blog.CategoryRss||queryString="xpage=plain&category=$escapetool.url($doc.fullName)" title="RSS"]] = {{html wiki=true}} ## Keep testing the inline action for backward compatibility with older categories. #if ($xcontext.action != 'edit' && $xcontext.action != 'inline') {{include reference="Blog.CreatePost"/}} #getCategoriesHierarchy($doc.space $tree) #if ("$!tree.get($doc.fullName)" != '') (% class="blog-categories-list subcategories" %) ((( ((( **Subcategories** ))) ((( #displayCategoriesHierarchyRecursive($tree $doc.fullName 1 'simple') ))) ))) #end (% class="clearfloats" %)((())) #getEntriesForCategory($doc.fullName $entries $totalEntries) #if ($totalEntries == 0) {{info}}{{translation key="xe.blog.categories.noentries"/}}{{/info}} #else #displayBlog($entries 'category' true true) ## displayNavigationLinks requires a blog document, to determine how should the entries be split into pages. Return this ## document, as the macro fallbacks to 'paginated' in case the right setting cannot be determined. #displayNavigationLinks($doc) #end #end {{/html}} #elseif ($doc.fullName == $blogCategorySheet) {{translation key="xe.blog.categories.sheetmessage"/}} #else {{warning}}{{translation key="xe.blog.categories.notcategory"/}}{{/warning}} #end {{/velocity}}