Here is a downloadable example I recently did that takes a master dataset custom property and parses it into template parameters for template repeaters:
Look this over and familiarize yourself with it.
To start with, get the basics of your template built, and work on getting your text and images to show up properly. One the basics are in place, we can turn or attention to solving problems of indention and collapsibility.