Using blocks
Pimcore blocks are a very clever system for iterating parts of a page. For example, if you have a standard page composed of horizontal bands or titled paragraphs, you can define a piece of HTML that explains how each item should look and let the user add as many items as they want. As another example, you can define a block composed of an H2 title and text, and this will create many titled paragraphs on your web page. Alternatively, you could use a block with an image and create a gallery iterating the blocks. Moreover, you can also manage the visibility of blocks by scheduling their publication.
Regular Blocks
pimcore_iterate_block
can return the list of blocks. All the code that is wrapped inside the for
loop can be replicated as many times as the user wants.
The difference between a block iteration and a regular for
loop is that in the case of a block, the user defines how many items they want, and all the data input inside the editables is persisted.
The...