Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
17.7.0
-
None
-
Unknown
-
Description
When displaying a document with a sheet, doc.displayTitle renders the the title of the sheet instead of the original document, whereas doc.title uses the original document's title (for instance in the sheet title, the sheet content and the navigation panel). This is inconsistent and displayTitle should probably use the original document's title or name instead
To reproduce:
1. import WrongDisplayTitleInSheet.WebHome.xar
2. Visit http://localhost:8080/xwiki/bin/view/WrongDisplayTitleInSheet/?sheet=WrongDisplayTitleInSheet.WrongDisplayTitleSheet
Expected:
The page shows "Display Title: WrongDisplayTitleSheet: handling"
Actual:
The page shows "Display Title: WrongDisplayTitleInSheet Home"
(Imperfect) workaround:
$stringtool.firstNonBlank($doc.title, $doc.name.replaceAll("^WebHome$", ""), $doc.documentReference.parent.name).trim()