added support for collections

Added support for collections which are rendered to separate HTML pages.