==
<?php
function onInit()
{
    $this['path_css'] = mix('css/common.css', 'themes/'.\Cms\Classes\Theme::getActiveTheme()->getDirName().'/assets');
    $this['path_js'] = mix('js/common.js', 'themes/'.\Cms\Classes\Theme::getActiveTheme()->getDirName().'/assets');

    /**
     * Check if Cart component has been registered and autoload it
     **/

    $obManager = \Cms\Classes\ComponentManager::instance();
    if ($obManager->hasComponent('Lovata\MightySeo\Components\SeoToolbox')) {
        $this['seo_toolbox_is_available'] = true;
        $this->addComponent('Lovata\MightySeo\Components\SeoToolbox', 'SeoToolbox', []);
    }
}
?>
==
{% spaceless %}
<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="{{ path_css }}">
    {% styles %}
    {% if seo_toolbox_is_available %}
        {% placeholder seo_tags default %}
            {% component 'SeoToolbox' %}
        {% endplaceholder %}
    {% endif %}
</head>
<body class="body">
    {% page %}
<script src="{{ path_js }}"></script>
{% framework extras %}
{% scripts %}
</body>
</html>
{% endspaceless %}
