Snippets

Clone blocks replacing placeholders

When cloning blocks with the cloneBlock method, you may replace the placeholders of the cloned blocks. There are two different approaches to do it:

  • Using the available replacement options of the cloneBlock method itself. These options allow to replace the placeholders with texts or WordFragments at the same time the blocks are getting cloned.
  • Using the firstMatch option. This one clones the blocks first and replace the placeholders afterwards.

Replacing placeholders using cloneBlock options

Replacing placeholders using the firstMatch option available in template methods