Last modified by Anton Bittner (Admin) on 24.11.2025

From version 2.1
edited by Anton Bittner (Admin)
on 24.11.2025
Change comment: Install extension [org.xwiki.contrib.blog:application-blog-ui/9.15.6]
To version 1.1
edited by Carina Enke (Admin)
on 30.01.2024
Change comment: Install extension [org.xwiki.contrib.blog:application-blog-ui/9.13.6]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.anbit_admin
1 +XWiki.carina_admin
Syntax
... ... @@ -1,1 +1,1 @@
1 -XWiki 2.1
1 +XWiki 2.0
Content
... ... @@ -12,24 +12,8 @@
12 12  #macro(getTargetCategory $categoryDoc)
13 13   #set($category = "$!{request.category}")
14 14   #if($category == '')
15 - #set ($categoryDoc = $doc)
16 - ## Since 9.15, category data may exist in Blog or Blog.Categories. Code supports both paths to maintain backward compatibility.
17 - ## This code checks whether a category exists in its original location (e.g., Blog.News).
18 - ## If the category is not found, it assumes a migration has occurred and automatically sets the category to its new location in the Blog.Categories namespace (e.g., Blog.Categories.News).
19 - #if (!$services.blog.hasLegacyCategoryAssignments())
20 - #set ($oldCategoryRef = $categoryDoc.documentReference)
21 - ## When accessing "Blog/News?xpage=plain&sheet=Blog.CategoryRss" and the Blog.News document is missing, the current doc is Blog.News.WebHome and that needs to be translated into the migrated category Blog.Categories.News.
22 - #if ($oldCategoryRef.name == 'WebHome')
23 - #set ($oldCategoryRef = $categoryDoc.documentReference.parent)
24 - #end
25 - #set ($newCategoriesSpaceRef = $services.model.createSpaceReference('Categories', $oldCategoryRef.parent))
26 - #set ($newCategoryRef = $services.model.createDocumentReference($oldCategoryRef.name, $newCategoriesSpaceRef))
27 - #if ($xwiki.exists($newCategoryRef))
28 - #set ($categoryDoc = $xwiki.getDocument($newCategoryRef))
29 - #end
30 - #end
31 - #if("$!categoryDoc.getObject($blogCategoryClassname)" != '' || $categoryDoc.getObject('XWiki.DocumentSheetBinding').sheet == 'Blog.CategoriesSheet')
32 - #set ($category = $categoryDoc.fullName)
15 + #if("$!doc.getObject($blogCategoryClassname)" != '' || $doc.getObject('XWiki.DocumentSheetBinding').sheet == 'Blog.CategoriesSheet')
16 + #set ($category = $doc.fullName)
33 33   #else
34 34   #set($category = $defaultCategoryParent)
35 35   #end