%- if base_url = canonical_base_url -%> <%- if path = type.try(&.path) -%> <%- base_url = File.join(base_url, path) -%> <%- end -%> <% end -%> <%- base_path = type.try(&.path_to("")) -%>