template-archive icon indicating copy to clipboard operation
template-archive copied to clipboard

Should CiceroMark support iterators blocks?

Open jeromesimeon opened this issue 6 years ago • 2 comments

Iterators Blocks ❌

Eventhough you could use an Ergo expression for this feature, we could also support:

{{#foreach products}}
- Product: {{name}}
{{/foreach}}

{{#foreach(",") products}}Product: {{name}}{{/foreach}}

This would be sometimes easier to write/read and would enable parsing for arrays of complex objects.

jeromesimeon avatar Nov 01 '19 15:11 jeromesimeon

Issue inherited from #392

jeromesimeon avatar Nov 01 '19 15:11 jeromesimeon

@jeromesimeon - I think this would be very useful. This would be a much more elegant and concise way to handle interior blocks.

In addition, as Ergo Expressions do not currently support markdown format then this would be a way to properly format text rendered by interior expressions.

For example:

{{#foreach products}}
- _Product:_ **{{name}}**
{{/foreach}}

Currently, there is no way (that I'm aware of) to format text rendered within interior blocks.

martinhalford avatar Aug 16 '20 23:08 martinhalford