Toggle the parent tree of BlogPostLayoutMacros. Wiki blog Toggle the hierarchy tree under Wiki blog. BlogPostLayoutMacros Toggle the hierarchy tree under BlogPostLayoutMacros.
Show last authors
author
version
line-number
content
1
{{velocity output='false'}}
2
#**
3
* Extract the layout parameters from a string.
4
*
5
* @param layoutParamsString The string representation of the layout parameters.
6
* It should contain a String following this format "paramName1=Value1|paramName2=Value2|...|paramNameK=ValueK"
7
* @param layoutsParameters The resulting layout parameters Map.
8
*###
9
#macro(extractLayoutParametersFromString $layoutParamsString $layoutsParameters)
10
#set ($layoutsParameters = $NULL)
11
#set ($macro.layoutParams = {})
12
#if ("$!layoutParamsString" != '')
13
#set ($macro.paramsArr = $layoutParamsString.split('\|'))
14
#foreach ($item in $macro.paramsArr)
15
#set ($itemSplit = $item.split('='))
16
#if ($itemSplit.size() == 2)
17
#set ($discard = $macro.layoutParams.put($itemSplit[0].trim(), $itemSplit[1].trim()))
18
#end
19
#end
20
#end
21
#setVariable("$layoutsParameters" $macro.layoutParams)
22
#end
23
{{/velocity}}
Toggle the right panel column.
#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)
[$!{entryDoc.display('title', 'view', $entryObj)}>$!{entryDoc.fullName}] #end #panelfooter() #end
#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)
[$!{entryDoc.display('title', 'view', $entryObj)}>$!{entryDoc.fullName}] #end [View all ($xwiki.countDocuments($query))>Blog.Unpublished] #panelfooter() #end
#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}}