I believe, unless you're using one of the subalbum modified themes already on the wiki, that you should select the subalbums testing theme, and get an idea of how they work first. Then you can adapt that to your own theme. Or, go to the wiki, at http://www.zenphoto.org/trac/wiki/ZenphotoThemes and select one that supports subalbums. Off the top of my head, Simpleviewer and Effervescence support them.