yiisoft / view-twig
Yii Framework Twig Extension
Fund package maintenance!
Opencollective
yiisoft
Installs: 1 072
Dependents: 1
Suggesters: 0
Security: 0
Stars: 26
Watchers: 16
Forks: 11
Open Issues: 0
pkg:composer/yiisoft/view-twig
Requires
- php: 8.1 - 8.5
- psr/container: ^1.0|^2.0
- twig/twig: ^3.3
- yiisoft/view: ^11|^12
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.8.3
- phpunit/phpunit: ^10.5.48
- rector/rector: ^2.1.2
- roave/infection-static-analysis-plugin: ^1.35
- spatie/phpunit-watcher: ^1.23
- vimeo/psalm: ^5.26.1 || ^6.8.9
- yiisoft/aliases: ^3.0
- yiisoft/psr-dummy-provider: ^1.0
- yiisoft/test-support: ^3.0
README
Yii View Twig Renderer
The package is an extension of the Yii View Rendering Library. This extension
provides a TwigTemplateRenderer that would allow you to use Twig view template engine.
Requirements
- PHP 8.1 - 8.5
Installation
The package could be installed with Composer:
composer require yiisoft/view-twig
General usage
In your application, you should specify the configuration for Twig
(by default, this is config/common/di/view-twig.php):
use Twig\Environment; use Twig\Loader\FilesystemLoader; use Twig\Loader\LoaderInterface; use Yiisoft\Aliases\Aliases; use Yiisoft\Definitions\Reference; /** @var array $params */ return [ LoaderInterface::class => static fn (Aliases $aliases) => new FilesystemLoader($aliases->get('@views')), Environment::class => [ '__construct()' => [ 'loader' => Reference::to(LoaderInterface::class), 'options' => $params['yiisoft/view-twig']['options'], ], ], ];
Create a views directory in your project and add an alias in config/common/aliases.php:
return [ // ... '@views' => '@root/views', ];
Also add the parameters for WebView and Environment to config/common/params.php:
use Psr\Container\ContainerInterface; use Psr\EventDispatcher\EventDispatcherInterface; use Twig\Environment; use Yiisoft\Aliases\Aliases; use Yiisoft\Definitions\DynamicReference; use Yiisoft\Definitions\Reference; use Yiisoft\View\WebView; use Yiisoft\View\Twig\TwigTemplateRenderer; return [ // ... 'yiisoft/view' => [ 'basePath' => '@views', 'defaultExtension' => 'twig', 'renderers' => [ 'twig' => Reference::to(TwigTemplateRenderer::class), ], // ... ], 'yiisoft/view-twig' => [ 'options' => [ 'cache' => DynamicReference::to(static fn (Aliases $aliases) => $aliases->get('@runtime/twig')), 'charset' => 'utf-8', 'debug' => $_ENV['APP_DEBUG'] ?? false, ], ], 'yiisoft/yii-view-renderer' => [ 'viewPath' => '@views', 'layout' => '@views/layout.twig', 'injections' => [ Reference::to(CsrfViewInjection::class), ], ], // ... ];
In your Controller Action or Response Handler, make sure yo use the desired Twig template:
return $this->viewRenderer->render('index.twig');
Template
All variables that were in the regular template are also available in the twig template.
The default main layout of the application template will look like this:
{% do assetManager.register('App\\Web\\Shared\\Layout\\Main\\MainAsset') %}
{% do this.addCssFiles(assetManager.getCssFiles()) %}
{% do this.addCssStrings(assetManager.getCssStrings()) %}
{% do this.addJsFiles(assetManager.getJsFiles()) %}
{% do this.addJsStrings(assetManager.getJsStrings()) %}
{% do this.addJsVars(assetManager.getJsVars()) %}
{{ this.beginPage()|raw }}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ this.getTitle() }}</title>
{{ this.head()|raw }}
</head>
<body>
{{ this.beginBody()|raw }}
<div class="header">
<a href="https://www.yiiframework.com/" target="_blank" rel="noopener">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 216.495">
<style>.st0 {
fill: #40b3d8
}</style>
<g>
<path class="st0"
d="M130.275 137.619c-1.461-19.284-7.681-31.784-10.71-38.869-3.027-7.083-7.682-13.714-7.685-13.703-.009.03-4.191 22.566-11.71 38.871-1.255 2.723-2.922 6.123-4.604 8.861-5.191 9.165-12.723 17.933-17.212 26.82-4.451 8.808-5.277 17.531-4.863 27.448.417 9.972 2.721 19.753 4.933 29.448 8.338-1.799 15.595-4.877 21.873-8.812 16.521-10.358 26.504-26.924 29.341-44.772 0 0 .138-.725.2-1.609 1.279-13.794.856-18.146.437-23.683z"/>
<path
d="M130.275 137.619c-1.461-19.284-7.681-31.784-10.71-38.869-3.027-7.083-7.682-13.714-7.685-13.703l-.001.005c0-.003.001-.006.001-.006l-1.111-1.652C86.405 49.193 39.68 32.117.202 47.944c-1.901 23.973 9.213 65.22 49.76 76.725 16.392 5.043 29.518 3.735 45.605 8.109-.001 0-.001.001-.001.001s16.352 5.699 25.865 14.245c4.279 3.843 8.564 8.901 8.349 14.917 1.355-14.317.921-18.697.495-24.322z"
style="fill:#83c933"/>
<path
d="M156.139-316.254c-.1-.618-.403-1.121-.759-1.621-.023-.032-.044-.067-.065-.1-.016-.019-.032-.041-.048-.061-.8-1.04-1.73-1.985-2.572-2.995-.801-.948-1.601-1.901-2.401-2.852-.961-1.142-1.922-2.283-2.884-3.427-1.073-1.277-2.149-2.558-3.227-3.836-1.144-1.36-2.287-2.716-3.429-4.077-1.165-1.383-2.33-2.767-3.491-4.149l-3.413-4.056c-1.066-1.268-2.13-2.533-3.192-3.798-.947-1.121-1.888-2.244-2.834-3.365-.777-.923-1.552-1.847-2.328-2.772-.564-.667-1.127-1.333-1.687-2.002l-.903-1.076c-.006-.007-.119-.134-.118-.134.018-.02.036-.039.055-.058l.148-.161c.083-.086.163-.176.246-.265.11-.121.223-.241.334-.362.141-.15.282-.301.423-.452.166-.179.331-.359.497-.538.192-.206.385-.412.577-.619.214-.233.432-.464.644-.695l.711-.768c.259-.276.518-.554.775-.832.275-.297.553-.593.826-.89.294-.317.586-.633.88-.948l.925-.996c.324-.348.647-.695.967-1.041.336-.361.669-.72 1.005-1.08.343-.371.688-.743 1.035-1.115.353-.381.707-.759 1.059-1.143.362-.39.723-.777 1.083-1.166.368-.395.734-.791 1.101-1.185.374-.4.744-.8 1.115-1.197.372-.404.745-.806 1.118-1.21.375-.401.75-.804 1.125-1.208.371-.401.745-.804 1.118-1.207.371-.398.745-.797 1.115-1.198.368-.394.734-.791 1.102-1.186.361-.39.723-.777 1.085-1.168.353-.382.707-.762 1.06-1.146.345-.372.694-.745 1.037-1.117l1.005-1.082c.323-.348.649-.694.969-1.044.31-.331.619-.666.929-.999l.884-.948c.275-.299.551-.599.832-.897.259-.277.515-.554.774-.836.238-.256.477-.511.715-.769.218-.233.433-.465.651-.701.192-.208.385-.416.58-.624.167-.182.334-.362.506-.544.491-.534 1.043-1.026 1.437-1.647.445-.701.598-1.585.15-2.327-.298-.493-.794-.82-1.344-.968-.285-.074-.58-.106-.871-.106h-9.304c-1.237 0-1.86 0-3.097 1.243l-29.142 32.86v-60.144c0-1.858-1.242-3.102-3.1-3.102h-6.823c-1.86 0-3.099 1.243-3.099 3.102v104.169c0 1.858 1.239 3.097 3.099 3.097h6.823c1.858 0 3.1-1.239 3.1-3.097v-34.723l29.142 35.96c1.238 1.243 1.86 1.86 3.097 1.86h9.658c.769 0 1.57-.283 2.136-.814.452-.428.575-1.049.478-1.647m-65.59-70.705v-6.818c0-1.863-1.242-2.484-3.1-2.484-12.404 0-21.834.302-29.894 4.023-2.024.964-2.971 2.178-2.971 3.42v70.683c0 1.86 1.242 3.1 2.479 3.1h7.441c1.863 0 2.481-1.24 2.481-3.1v-65.102c5.58-1.243 10.541-1.243 20.464-1.243 3.1 0 3.1-.619 3.1-2.479m-58.905 37.823c0 14.88-6.202 24.183-19.843 24.183s-19.84-9.304-19.84-24.183v-11.162c0-14.878 6.199-24.182 19.84-24.182s19.843 9.303 19.843 24.182v11.162zm13.022 0v-11.162c0-21.701-11.163-35.342-32.865-35.342-21.703 0-32.86 14.262-32.86 35.342v11.162c0 21.702 11.158 35.341 32.86 35.341 21.702.621 32.865-13.638 32.865-35.341m-75.028 3.102v-45.885c0-1.858-1.238-3.102-3.1-3.102h-6.408c-1.858 0-3.1 1.243-3.1 3.102v45.885c0 16.119-6.613 21.698-18.392 21.698-3.723 0-7.855-.617-12.194-1.858v-65.725c0-1.858-1.239-3.102-3.102-3.102h-6.616c-1.86 0-3.097 1.243-3.097 3.102v65.725c-4.342 1.242-8.475 1.858-12.193 1.858-12.401 0-18.396-5.579-18.396-21.698v-45.885c0-1.858-1.238-3.102-3.097-3.102h-6.411c-1.86 0-3.097 1.243-3.097 3.102v45.885c0 26.04 14.258 32.86 29.759 32.86 7.444 0 13.642-1.238 19.222-3.718 6.203 2.481 11.783 3.718 19.223 3.718 16.74 0 30.999-6.82 30.999-32.86m-119.668-14.264h-39.064v-1.24c0-15.501 6.82-22.942 19.843-22.942 13.022 0 19.22 6.202 19.22 22.942v1.24zm13.02 6.82v-8.06c0-20.461-11.159-34.102-32.241-34.102-21.083 0-32.862 13.02-32.862 34.102v13.021c0 27.282 16.121 35.342 33.48 35.342 9.924 0 17.983-.621 26.042-2.481 2.484-.619 3.1-1.237 3.1-3.1v-4.96c0-1.237-1.238-1.86-2.479-1.86h-.621c-6.82 1.239-17.361 1.86-26.042 1.86-13.641 0-20.461-6.2-20.461-23.561v-3.1h48.987c1.859.001 3.097-1.238 3.097-3.101m-74.404 35.965v-50.583c0-7.348-.336-16.488-6.347-21.681-1.479-1.277-3.182-2.279-4.975-3.058-2.194-.954-4.519-1.591-6.865-2.046-1.777-.348-3.573-.587-5.376-.759h-3.1c-8.678 0-14.882 1.24-19.219 4.96-4.343-4.341-10.541-4.96-19.222-4.96h-3.102c-17.359 0-26.04 10.541-26.04 25.424v52.703c0 1.858 1.237 3.102 2.478 3.102h7.441c1.861 0 2.481-1.243 2.481-3.102v-52.703c0-12.404 5.58-14.264 13.02-14.264h3.1c9.304 0 12.404 1.86 12.404 9.922v57.045c0 1.858 1.238 3.102 2.481 3.102h7.439c1.858 0 2.481-1.243 2.481-3.102v-57.045c0-8.062 3.1-9.922 12.399-9.922h3.1c8.062 0 13.02 1.86 13.02 14.264v52.703c0 1.858 1.243 3.102 2.481 3.102h4.96c4.342-.001 4.961-1.244 4.961-3.102m-116.57-8.062c-4.341.622-11.159 1.239-17.359 1.239-14.264 0-19.223-9.92-19.223-25.421v-9.92c0-15.499 4.342-25.422 19.223-25.422 6.2 0 13.019.62 17.359 1.24v58.284zm13.02 5.581v-68.823c0-1.863-.617-2.481-3.097-3.102-8.06-1.858-17.985-3.102-27.282-3.102-21.704 0-32.244 14.264-32.244 35.963v9.922c0 21.702 9.92 35.962 32.244 35.962 8.681 0 19.222-1.238 27.282-3.1 2.481-1.239 3.097-1.86 3.097-3.72m-63.862-66.965v-6.818c0-1.863-1.242-2.484-3.1-2.484-12.404 0-22.323.621-30.384 4.342-1.858.621-2.481 1.86-2.481 3.102v70.683c0 1.86 1.242 3.1 2.481 3.1h7.439c1.863 0 2.481-1.24 2.481-3.1v-65.102c5.581-1.243 10.541-1.243 20.464-1.243 3.1-.001 3.1-.62 3.1-2.48m-46.505-29.763v-4.96c0-1.238-.532-1.965-3.1-2.481-2.481-.62-8.06-.62-13.02-.62-13.641 0-22.319 4.96-22.319 20.463v87.427c0 1.71 1.387 3.097 3.097 3.097h6.823c1.713 0 3.1-1.387 3.1-3.097v-67.587h22.94c1.86 0 2.479-1.239 2.479-2.479v-4.96c0-1.858-1.237-2.481-2.479-2.481h-23.561v-9.92c0-8.681 1.858-9.922 9.92-9.922h11.688c1.022 0 2.212-.047 3.03-.378.952-.383 1.402-.933 1.402-2.102"
style="fill:#062730" transform="translate(843.83 480.501)"/>
<path class="st0"
d="M-47.14-535.193c5.58 0 9.919 4.341 9.919 9.922 0 5.579-4.339 9.921-9.919 9.921-5.582 0-9.922-4.342-9.922-9.921 0-4.962 4.339-9.922 9.922-9.922m-35.964 0c5.578 0 9.922 4.341 9.922 9.922 0 5.579-4.343 9.921-9.922 9.921-5.579 0-9.923-4.342-9.923-9.921 0-4.962 4.344-9.922 9.923-9.922m9.922 121.53v-92.387c0-1.858-1.243-3.1-3.103-3.1h-13.641c-1.858 0-3.1 1.242-3.1 3.1v92.387c0 1.86 1.242 3.1 3.1 3.1h13.641c1.859-.621 3.103-1.858 3.103-3.1m-35.346 2.479v-97.346c-7.439 0-19.222 4.96-19.222 15.501v66.344c-4.338.621-10.541 1.243-14.258 1.243-12.404 0-15.501-8.683-15.501-20.464v-47.745c-.621-11.78-13.643-14.88-19.222-14.88v62.006c0 22.319 11.161 36.581 34.723 36.581 3.717 0 11.161-1.242 14.258-1.861l.164 1.608c.858 19.313-20.625 11.415-33.024 10.173-9.302 0-15.501 7.441-17.364 16.122 5.581 1.86 22.944 3.721 35.344 4.96 22.324.621 34.102-11.778 34.102-32.242m70.688-2.479v-92.387c0-1.858-1.24-3.1-3.1-3.1h-13.641c-1.86 0-3.102 1.242-3.102 3.1v92.387c0 1.86 1.242 3.1 3.102 3.1h13.641c1.86-.621 3.1-1.858 3.1-3.1"
transform="translate(396.196 576.03)"/>
<path
d="M-120.995-431.898c-5.761-16.855-3.32-28.149 7.22-43.866 5.027-7.499 13.706-16.197 21.313-21.111 30.691 19.232 42.039 55.054 30.752 88.323-8.214 24.207-15.921 34.357-35.408 59.263 2.271-26.674-7.117-45.167-16.334-65.715-2.346-5.228-5.59-11.179-7.543-16.894"
style="fill-rule:evenodd;clip-rule:evenodd;fill:#f18a2a" transform="translate(233.564 496.875)"/>
<path
d="M-115.623-336.617c.215-6.016-4.07-11.074-8.349-14.917-9.513-8.546-25.864-14.245-25.864-14.245 1.682-2.738 3.349-6.138 4.604-8.861 7.519-16.305 11.701-38.841 11.71-38.871.003-.01 4.657 6.62 7.685 13.703 3.029 7.085 9.248 19.584 10.71 38.869.425 5.625.859 10.005-.496 24.322z"
style="fill:#7fb93c" transform="translate(245.403 498.558)"/>
</g>
</svg>
</a>
</div>
<div class="content">
<div class="content_i">
{{- content|raw -}}
</div>
</div>
<div class="footer">
<div class="footer_copyright">
<a href="https://www.yiiframework.com/" target="_blank" rel="noopener">
© {{ "now"|date("Y") }} {{ applicationParams.name }}
</a>
</div>
<div class="footer_icons">
<a href="https://github.com/yiisoft" target="_blank" rel="noopener" title="GitHub">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 291.32 291.32">
<path
d="M145.66 0C65.219 0 0 65.219 0 145.66c0 80.45 65.219 145.66 145.66 145.66s145.66-65.21 145.66-145.66C291.319 65.219 226.1 0 145.66 0zm40.802 256.625c-.838-11.398-1.775-25.518-1.83-31.235-.364-4.388-.838-15.549-11.434-22.677 42.068-3.523 62.087-26.774 63.526-57.499 1.202-17.497-5.754-32.883-18.107-45.3.628-13.282-.401-29.023-1.256-35.941-9.486-2.731-31.608 8.949-37.79 13.947-13.037-5.062-44.945-6.837-64.336 0-13.747-9.668-29.396-15.64-37.926-13.974-7.875 17.452-2.813 33.948-1.275 35.914-10.142 9.268-24.289 20.675-20.447 44.572 6.163 35.04 30.816 53.94 70.508 58.564-8.466 1.73-9.896 8.048-10.606 10.788-26.656 10.997-34.275-6.791-37.644-11.425-11.188-13.847-21.23-9.832-21.849-9.614-.601.218-1.056 1.092-.992 1.511.564 2.986 6.655 6.018 6.955 6.263 8.257 6.154 11.316 17.27 13.2 20.438 11.844 19.473 39.374 11.398 39.638 11.562.018 1.702-.191 16.032-.355 27.184C64.245 245.992 27.311 200.2 27.311 145.66c0-65.365 52.984-118.348 118.348-118.348S264.008 80.295 264.008 145.66c0 51.008-32.318 94.332-77.546 110.965z"
/>
</svg>
</a>
<a href="https://join.slack.com/t/yii/shared_invite/enQtMzQ4MDExMDcyNTk2LTc0NDQ2ZTZhNjkzZDgwYjE4YjZlNGQxZjFmZDBjZTU3NjViMDE4ZTMxNDRkZjVlNmM1ZTA1ODVmZGUwY2U3NDA"
target="_blank"
rel="noopener"
title="Slack"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
d="M6.194 14.644c0 1.16-.943 2.107-2.103 2.107a2.11 2.11 0 0 1-2.104-2.107 2.11 2.11 0 0 1 2.104-2.106h2.103v2.106zm1.061 0c0-1.16.944-2.106 2.104-2.106a2.11 2.11 0 0 1 2.103 2.106v5.274a2.11 2.11 0 0 1-2.103 2.106 2.108 2.108 0 0 1-2.104-2.106v-5.274zm2.104-8.455c-1.16 0-2.104-.948-2.104-2.107s.944-2.106 2.104-2.106a2.11 2.11 0 0 1 2.103 2.106v2.107H9.359zm0 1.06a2.11 2.11 0 0 1 2.103 2.107 2.11 2.11 0 0 1-2.103 2.106H4.092a2.11 2.11 0 0 1-2.104-2.106 2.11 2.11 0 0 1 2.104-2.107h5.267zm8.447 2.107c0-1.16.943-2.107 2.103-2.107a2.11 2.11 0 0 1 2.104 2.107 2.11 2.11 0 0 1-2.104 2.106h-2.103V9.356zm-1.061 0c0 1.16-.944 2.106-2.104 2.106a2.11 2.11 0 0 1-2.103-2.106V4.082a2.11 2.11 0 0 1 2.103-2.106c1.16 0 2.104.946 2.104 2.106v5.274zm-2.104 8.455c1.16 0 2.104.948 2.104 2.107s-.944 2.106-2.104 2.106a2.11 2.11 0 0 1-2.103-2.106v-2.107h2.103zm0-1.06a2.11 2.11 0 0 1-2.103-2.107 2.11 2.11 0 0 1 2.103-2.106h5.268a2.11 2.11 0 0 1 2.104 2.106 2.11 2.11 0 0 1-2.104 2.107h-5.268z"
/>
</svg>
</a>
<a href="https://www.facebook.com/groups/yiitalk" target="_blank" rel="noopener" title="Facebook">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 408.788 408.788">
<path
d="M353.701,0H55.087C24.665,0,0.002,24.662,0.002,55.085v298.616c0,30.423,24.662,55.085,55.085,55.085h147.275l0.251-146.078h-37.951c-4.932,0-8.935-3.988-8.954-8.92l-0.182-47.087c-0.019-4.959,3.996-8.989,8.955-8.989h37.882v-45.498c0-52.8,32.247-81.55,79.348-81.55h38.65c4.945,0,8.955,4.009,8.955,8.955v39.704c0,4.944-4.007,8.952-8.95,8.955l-23.719,0.011c-25.615,0-30.575,12.172-30.575,30.035v39.389h56.285c5.363,0,9.524,4.683,8.892,10.009l-5.581,47.087c-0.534,4.506-4.355,7.901-8.892,7.901h-50.453l-0.251,146.078h87.631c30.422,0,55.084-24.662,55.084-55.084V55.085C408.786,24.662,384.124,0,353.701,0"
/>
</svg>
</a>
<a href="https://twitter.com/yiiframework" target="_blank" rel="noopener" title="Twitter">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512.002 512.002">
<path
d="M500.398 94.784c-8.043 3.567-16.313 6.578-24.763 9.023 10.004-11.314 17.631-24.626 22.287-39.193 1.044-3.265-.038-6.839-2.722-8.975-2.681-2.137-6.405-2.393-9.356-.644-17.945 10.643-37.305 18.292-57.605 22.764-20.449-19.981-48.222-31.353-76.934-31.353-60.606 0-109.913 49.306-109.913 109.91 0 4.773.302 9.52.9 14.201-75.206-6.603-145.124-43.568-193.136-102.463-1.711-2.099-4.347-3.231-7.046-3.014-2.7.211-5.127 1.734-6.491 4.075-9.738 16.709-14.886 35.82-14.886 55.265 0 26.484 9.455 51.611 26.158 71.246-5.079-1.759-10.007-3.957-14.711-6.568-2.525-1.406-5.607-1.384-8.116.054-2.51 1.439-4.084 4.084-4.151 6.976-.012.487-.012.974-.012 1.468 0 39.531 21.276 75.122 53.805 94.52-2.795-.279-5.587-.684-8.362-1.214-2.861-.547-5.802.456-7.731 2.638-1.932 2.18-2.572 5.219-1.681 7.994 12.04 37.591 43.039 65.24 80.514 73.67-31.082 19.468-66.626 29.665-103.939 29.665-7.786 0-15.616-.457-23.279-1.364-3.807-.453-7.447 1.795-8.744 5.416-1.297 3.622.078 7.66 3.316 9.736 47.935 30.735 103.361 46.98 160.284 46.98 111.903 0 181.907-52.769 220.926-97.037 48.657-55.199 76.562-128.261 76.562-200.451 0-3.016-.046-6.061-.139-9.097 19.197-14.463 35.724-31.967 49.173-52.085 2.043-3.055 1.822-7.094-.545-9.906-2.361-2.817-6.301-3.727-9.663-2.237z"
/>
</svg>
</a>
<a href="https://t.me/yii3en" target="_blank" rel="noopener" title="Telegram">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path
d="M10 0c5.522847 0 10 4.477152 10 10 0 5.522847-4.477153 10-10 10-5.522848 0-10-4.477153-10-10C0 4.477152 4.477152 0 10 0Zm4.44152 6c-.380967.00676-.965465.207411-3.778372 1.362498-.985186.404555-2.954171 1.241881-5.906955 2.51198-.479486.188247-.730662.372408-.753528.55248-.0439.345722.460248.45335 1.094572.656918.517165.16597 1.212843.360136 1.574497.36785.328055.006997.694202-.126527 1.098441-.400574 2.758878-1.838605 4.183023-2.767925 4.272434-2.78796.063079-.014134.15049-.031906.209715.020065.059226.05197.053403.150393.04713.176797-.050161.21112-2.641806 2.538403-2.790957 2.691345l-.071523.071907c-.54956.542806-1.105014.8972-.146641 1.52071.865332.56298 1.36896.922122 2.260436 1.499054.569705.368694 1.01636.805908 1.604566.75247.270659-.02459.550232-.275851.692217-1.025227.335553-1.771.995126-5.608216 1.147558-7.189441.013355-.138536-.003445-.315834-.016937-.393664-.013492-.07783-.041685-.188721-.144157-.27081-.121356-.097219-.308705-.11772-.392495-.116398Z"
/>
</svg>
</a>
</div>
</div>
{{ this.endBody()|raw }}
</body>
</html>
{{ this.endPage(true)|raw }}
And the view template of the main page (site/index) will be as follows:
{% do this.setTitle(applicationParams.name) %}
<div class="text-center">
<h1>Hello!</h1>
<p>Let's start something great with <strong>Yii3</strong>!</p>
<p>
<a href="https://yiisoft.github.io/docs/" target="_blank" rel="noopener">
<i>Don't forget to check the guide.</i>
</a>
</p>
</div>
Documentation
If you need help or have a question, the Yii Forum is a good place for that. You may also check out other Yii Community Resources.
License
The Yii View Twig Renderer is free software. It is released under the terms of the BSD License.
Please see LICENSE for more information.
Maintained by Yii Software.