partial'ized main template
moved logic for generating list entries to main script