added 'fields' tpl var to BaseDocumentClassBuilder