Information about Macros for the Blog application
- English
- XWiki 2.1
- Yes
This page is not enforcing any right. The rights of its last author apply to the page content.
This page is not enforcing any right. The rights of its last author apply to the page content.
#includeMacros("Blog.BlogCode")
#getBlogEntriesBaseQuery($query)
#set($query = "$!{query} and isPublished.value = 1")
#set($recentEntries = $xwiki.searchDocuments("${query} order by publishDate.value desc", 10, 0))
#if($recentEntries.size() > 0 || $showEmptyPanels)
#panelheader('Recent Blog Posts')
#foreach($entryDoc in $xwiki.wrapDocs($recentEntries))
#getEntryObject($entryDoc $entryObj)
#includeMacros("Blog.BlogCode")
#getBlogEntriesBaseQuery($query)
#set($query = "$!{query} and isPublished.value = 0")
#set($unpublishedEntries = $xwiki.searchDocuments("${query} order by publishDate.value desc", 5, 0))
#if($unpublishedEntries.size() > 0 || $showEmptyPanels)
#panelheader("Unpublished Posts")
#foreach($entryDoc in $xwiki.wrapDocs($unpublishedEntries))
#getEntryObject($entryDoc $entryObj)
#includeMacros("Blog.CategoriesCode")
#panelheader('Blog Categories')
#getCategoriesHierarchy('Blog' $tree)
#displayCategoriesHierarchy($tree 'simple')
#if($xwiki.hasAdminRights())
<div style="font-size:75%;">(<a href="$xwiki.getURL('Blog.ManageCategories')">Edit Categories</a>)</div>
#end
#panelfooter()
{{include reference="Blog.BlogCode"/}}
{{velocity}} #getAllBlogPostsQueryBasedOnDisplayContext($doc $query $queryParams) #bindQueryParameters($queryObj $queryParams) {{/velocity}}