UNIT6-open / TemplateEngine.Docx

Smart docx template engine for .NET
Other
406 stars 137 forks source link

Add support for RepeatContent within RepeatContent (or ListContent) #60

Open biohazardxxx opened 5 years ago

biohazardxxx commented 5 years ago

Adding a RepeatContent to a RepeatContent does not work. It would be helpful to create a nested structure of text. image (n products, have n patches with n changes) Otherwise nested ListContent would be an alternative to have nested ListContent blocks .

something like:

var valuesToFill = new Content(new RepeatContent("RepeatParentContent")
.AddItem(new FieldContent("Title", "Tests"),
new RepeatContent("RepeatChildrenContent", new FieldContent("SubTest", "WORKS!!!!"))
.AddItem(new RepeatContent("RepeatChildrenContent", new FieldContent("SubTest", "WORKS also!!!!")))
);