I have a Matrix field with some different block types; images, videos, text, etc. When I loop over the blocks I have some extra code (facebook and twitter sharing, back-button, etc) that should only be output for the last "text" block.
How can I know, inside the loop, if the current block is the last of its type?
block.lastOfType
guided me in the right direction. ;) See new answer below!