Skip to content

Commit aea88ef

Browse files
committed
Merge branch 'commercial-hippie/5.x' into 5.5
Resolves #15932
2 parents 28de74d + b5ba71b commit aea88ef

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

CHANGELOG-WIP.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
- Added `craft\web\View::registerSiteTwigExtension()`.
5656
- Added `craft\helpers\Console::$outputCount`.
5757
- Added `craft\helpers\Console::$prependNewline`.
58+
- Added `craft\fieldlayoutelements\Template::$templateMode`. ([#15932](https://github.com/craftcms/cms/pull/15932))
5859
- `craft\helpers\Console::output()` now prepends an indent to each line of the passed-in string, if `indent()` had been called prior.
5960
- Deprecated the `enableBasicHttpAuth` config setting. `craft\filters\BasicHttpAuthLogin` should be used instead. ([#15720](https://github.com/craftcms/cms/pull/15720))
6061
- Added the `serializeForm` event to `Craft.ElementEditor`. ([#15794](https://github.com/craftcms/cms/discussions/15794))

src/fieldlayoutelements/Template.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ class Template extends BaseUiElement
2727
*/
2828
public string $template = '';
2929

30+
/**
31+
* @var string The template mode to use when loading the template.
32+
* @since 5.5.0
33+
*/
34+
public string $templateMode = View::TEMPLATE_MODE_SITE;
35+
3036
/**
3137
* @inheritdoc
3238
*/
@@ -100,7 +106,7 @@ public function formHtml(?ElementInterface $element = null, bool $static = false
100106
$content = trim(Craft::$app->getView()->renderTemplate($this->template, [
101107
'element' => $element,
102108
'static' => $static,
103-
], View::TEMPLATE_MODE_SITE));
109+
], $this->templateMode));
104110
} catch (Throwable $e) {
105111
return $this->_error($e->getMessage(), 'error');
106112
}

0 commit comments

Comments
 (0)