When displaying a document with a sheet, if the sheet uses doc.displayTitle, the title of the sheet is used, whereas doc.title uses the original document's title. 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() |