Fix error:undefined method each for nil:NilClass due to modules var not being present within template scope
Handle template content for case when $custom_config parameter is undef