Automatic selection of most recent gallery templates