view "<%= @title %>" {
<% unless @forwarders.empty? -%>
    forward <%= @forward %>;
    forwarders { <%= @forwarders.join('; ') %>; };
<% end -%>
<% unless @match_clients.empty? -%>
    match-clients { <%= @match_clients.join('; ') %>; };
<% end -%>
<% unless @match_destinations.empty? -%>
    match-destinations { <%= @match_destinations.join('; ') %>; };
<% end -%>
<% unless @allow_transfer.empty? -%>
    allow-transfer { <%= @allow_transfer.join('; ') %>; };
<% end -%>
<% unless @allow_recursion.empty? -%>
    allow-recursion { <%= @allow_recursion.join('; ') %>; };
<% end -%>
<% unless @allow_query.empty? -%>
    allow-query { <%= @allow_query.join('; ') %>; };
<% end -%>
<% unless @allow_query_cache.empty? -%>
    allow-query-cache { <%= @allow_query_cache.join('; ') %>; };
<% end -%>
<% unless @also_notify.empty? -%>
    also-notify { <%= @also_notify.join('; ') %>; };
<% end -%>
    notify <%= @dns_notify %>;
    match-recursive-only <%= @match_recursive_only %>;
    recursion <%= @recursion %>;
    dnssec-enable <%= @dnssec_enable %>;
    dnssec-validation <%= @dnssec_validation %>;

<% if @include_localzones -%>
<% if scope.lookupvar("::dns::localzonepath") != 'unmanaged' -%>
include "<%= scope.lookupvar('::dns::localzonepath') %>";
<% end -%>
<% end -%>
<% if @include_defaultzones -%>
<% if scope.lookupvar("::dns::defaultzonepath") != 'unmanaged' -%>
include "<%= scope.lookupvar('::dns::defaultzonepath') %>";
<% end -%>
<% end -%>
