Changes for page Release Notes for XWiki 5.1 Milestone 2
Last modified by Thomas Mortagne on 2017/03/24
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. VincentMassol1 +XWiki.mflorea - Content
-
... ... @@ -38,7 +38,13 @@ 38 38 39 39 == Miscellaneous == 40 40 41 -<other dev stuff to add and link to JIRA for all issues fixed> 41 +* A new Velocity macro is available to display the title of a [[sheet>>doc:extensions:Extension.Sheet Module]]. Most of the times when you have a sheet you want to display some text when the user visits the sheet page and something different when the user visits a page where the sheet is applied. Up until now the solution was to write an if in the sheet title to check if the current document is the sheet. E.g.:((( 42 +{{code language="none"}}#if ($doc.fullName == 'AppWithinMinutes.LiveTableViewSheet')LiveTable View Sheet#{else}#evaluate($doc.title)#end{{/code}} 43 +This can now be written as: 44 +{{code language="none"}}#sheetTitle('LiveTable View Sheet' $doc.fullName.equals('AppWithinMinutes.LiveTableViewSheet')){{/code}} 45 +or, if the sheet has an object of type ##XWiki.SheetDescriptorClass##: 46 +{{code language="none"}}#sheetTitle('LiveTable View Sheet'){{/code}} 47 +))) 42 42 43 43 = Translations = 44 44