Changes for page Release Notes for XWiki 6.1 RC 1
Last modified by Thomas Mortagne on 2017/03/24
Change comment:
describe XRENDERING-349
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ManuelSmeria1 +XWiki.ClemensRobbenhaar - Content
-
... ... @@ -74,6 +74,15 @@ 74 74 75 75 In this second sample, the macro will fail with an AccessDeniedException if the right is not allowed. 76 76 77 +== Access to BlockMatchers from velocity scripts == 78 + 79 +To be able to use the ##Block.getBlocks(BlockMatcher, Block.Axes)## method on the rendering blocks in the documents XDOM from velocity, a converter has been introduced that maps string expressions to BlockMatcher objects. The current implementation only supports mapping to ClassBlockMatchers, and allows to get all blocks of a given type from the XDOM. 80 + 81 +{{code language="velocity"}} 82 +#foreach($headerBlock in $doc.getDocument().getXDOM().getBlocks("class:HeaderBlock", "DESCENDANT")) 83 + ... do something with the header block ... 84 +{{/code}} 85 + 77 77 == Deprecated and Retired projects == 78 78 79 79 <description of deprecated and retired projects>