Skip to content

Commit

Permalink
allowing all .twig files (for also including xml files)
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherPix committed Jun 9, 2022
1 parent 108e2a9 commit cfa2f31
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Core/Framework/App/Template/TemplateLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TemplateLoader extends AbstractTemplateLoader
'documents',
];

private const ALLOWED_FILE_EXTENSIONS = '*.html.twig';
private const ALLOWED_FILE_EXTENSIONS = '*.twig';

/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% sw_extends '@Storefront/storefront/page/sitemap/sitemap.xml.twig' %}

{% block sitemap %}
{{ parent() }}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testGetTemplatePathsForApp(): void
sort($templates);

static::assertEquals(
['storefront/layout/header/header.html.twig', 'storefront/layout/header/logo.html.twig'],
['storefront/layout/header/header.html.twig', 'storefront/layout/header/logo.html.twig', 'storefront/page/sitemap/sitemap.xml.twig'],
$templates
);
}
Expand Down

0 comments on commit cfa2f31

Please sign in to comment.