Skip to content

Commit

Permalink
Check for .twig before .html
Browse files Browse the repository at this point in the history
Resolves #11809
  • Loading branch information
brandonkelly committed Aug 23, 2022
1 parent 256723e commit 3ca636e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

### Changed
- Craft now requires PHP 8.1 or later.
- The `defaultTemplateExtensions` config setting now lists `twig` before `html` by default. ([#11809](https://github.com/craftcms/cms/discussions/11809))
6 changes: 3 additions & 3 deletions src/config/GeneralConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ class GeneralConfig extends BaseConfig
*
* ::: code
* ```php Static Config
* 'defaultTemplateExtensions' => ['html', 'twig', 'txt'],
* 'defaultTemplateExtensions' => ['twig', 'html', 'txt'],
* ```
* ```shell Environment Override
* CRAFT_DEFAULT_TEMPLATE_EXTENSIONS=html,twig,txt
Expand All @@ -811,7 +811,7 @@ class GeneralConfig extends BaseConfig
*
* @group System
*/
public array $defaultTemplateExtensions = ['html', 'twig'];
public array $defaultTemplateExtensions = ['twig', 'html'];

/**
* @var mixed The default amount of time tokens can be used before expiring.
Expand Down Expand Up @@ -3804,7 +3804,7 @@ public function defaultSearchTermOptions(array $value): self
* The template file extensions Craft will look for when matching a template path to a file on the front end.
*
* ```php
* ->defaultTemplateExtensions(['html', 'twig', 'txt'])
* ->defaultTemplateExtensions(['twig', 'html', 'txt'])
* ```
*
* @group System
Expand Down

0 comments on commit 3ca636e

Please sign in to comment.