<?php
use Twig\Environment;
use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @SasBlogModule/storefront/layout/meta.html.twig */
class __TwigTemplate_b4cd5bb762dc7e87dfd7171c17359e5844242e993e1adb4a1758b929c9bef477 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'layout_head_meta_tags' => [$this, 'block_layout_head_meta_tags'],
'layout_head_meta_tags_description' => [$this, 'block_layout_head_meta_tags_description'],
'layout_head_title' => [$this, 'block_layout_head_title'],
'layout_head_meta_tags_schema_webpage' => [$this, 'block_layout_head_meta_tags_schema_webpage'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@MoorlFoundation/storefront/layout/meta.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SasBlogModule/storefront/layout/meta.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SasBlogModule/storefront/layout/meta.html.twig"));
$this->parent = $this->loadTemplate("@MoorlFoundation/storefront/layout/meta.html.twig", "@SasBlogModule/storefront/layout/meta.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_layout_head_meta_tags($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_head_meta_tags"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_head_meta_tags"));
// line 4
echo " ";
if ((($context["activeRoute"] ?? null) == "sas.frontend.blog.detail")) {
// line 5
echo " <link rel=\"canonical\" href=\"";
echo sw_escape_filter($this->env, $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SeoUrlFunctionExtension']->seoUrl("sas.frontend.blog.detail", ["articleId" => sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "id", [], "any", false, false, false, 5)]), "html", null, true);
echo "\" />
";
// line 6
if (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "translated", [], "any", false, false, false, 6), "metaTitle", [], "any", false, false, false, 6)) {
// line 7
echo " ";
$context["metaTitle"] = twig_trim_filter(twig_striptags(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "translated", [], "any", false, false, false, 7), "metaTitle", [], "any", false, false, false, 7)));
// line 8
echo " ";
} else {
// line 9
echo " ";
$context["metaTitle"] = twig_trim_filter(twig_striptags(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "translated", [], "any", false, false, false, 9), "title", [], "any", false, false, false, 9)));
// line 10
echo " ";
}
// line 11
echo " ";
}
// line 12
echo " ";
$this->displayParentBlock("layout_head_meta_tags", $context, $blocks);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 15
public function block_layout_head_meta_tags_description($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_head_meta_tags_description"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_head_meta_tags_description"));
if ((($context["activeRoute"] ?? null) == "sas.frontend.blog.detail")) {
if (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "translated", [], "any", false, false, false, 15), "metaDescription", [], "any", false, false, false, 15)) {
echo sw_escape_filter($this->env, twig_trim_filter(twig_striptags(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "translated", [], "any", false, false, false, 15), "metaDescription", [], "any", false, false, false, 15))), "html", null, true);
} else {
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "translated", [], "any", false, false, false, 15), "teaser", [], "any", false, false, false, 15), "html", null, true);
}
} else {
$this->displayParentBlock("layout_head_meta_tags_description", $context, $blocks);
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 17
public function block_layout_head_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_head_title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_head_title"));
// line 18
echo " ";
if ((($context["activeRoute"] ?? null) == "sas.frontend.blog.detail")) {
// line 19
echo " ";
if (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "translated", [], "any", false, false, false, 19), "metaTitle", [], "any", false, false, false, 19)) {
// line 20
echo " ";
$context["metaTitle"] = twig_trim_filter(twig_striptags(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "translated", [], "any", false, false, false, 20), "metaTitle", [], "any", false, false, false, 20)));
// line 21
echo " ";
} else {
// line 22
echo " ";
$context["metaTitle"] = twig_trim_filter(twig_striptags(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "translated", [], "any", false, false, false, 22), "title", [], "any", false, false, false, 22)));
// line 23
echo " ";
}
// line 24
echo " ";
}
// line 25
echo "
";
// line 26
$this->displayParentBlock("layout_head_title", $context, $blocks);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 29
public function block_layout_head_meta_tags_schema_webpage($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_head_meta_tags_schema_webpage"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_head_meta_tags_schema_webpage"));
// line 30
echo " ";
$this->displayParentBlock("layout_head_meta_tags_schema_webpage", $context, $blocks);
echo "
";
// line 32
if ((($context["activeRoute"] ?? null) == "sas.frontend.blog.detail")) {
// line 33
echo " <script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org\",
\"@type\": \"BlogPosting\",
\"headline\": \"";
// line 37
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "translated", [], "any", false, false, false, 37), "title", [], "any", false, false, false, 37), "html", null, true);
echo "\",
\"datePublished\": \"";
// line 38
echo sw_escape_filter($this->env, twig_date_format_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "publishedAt", [], "any", false, false, false, 38)), "html", null, true);
echo "\",
\"dateModified\": \"";
// line 39
echo sw_escape_filter($this->env, twig_date_format_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "updatedAt", [], "any", false, false, false, 39)), "html", null, true);
echo "\",
\"description\": \"";
// line 40
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "translated", [], "any", false, false, false, 40), "teaser", [], "any", false, false, false, 40), "html", null, true);
echo "\",
\"author\": {
\"@type\": \"Person\",
\"name\": \"";
// line 43
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "author", [], "any", false, false, false, 43), "translated", [], "any", false, false, false, 43), "name", [], "any", false, false, false, 43), "html", null, true);
echo "\"
},
";
// line 45
if (twig_length_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "media", [], "any", false, false, false, 45), "thumbnails", [], "any", false, false, false, 45), "elements", [], "any", false, false, false, 45))) {
// line 46
echo " \"image\":[";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "media", [], "any", false, false, false, 46), "thumbnails", [], "any", false, false, false, 46), "elements", [], "any", false, false, false, 46));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
echo "\"";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, false, 46), "html", null, true);
echo "\"";
echo ((sw_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 46)) ? ("") : (","));
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
echo "],";
}
// line 47
echo " \"mainEntityOfPage\": {
\"@type\": \"WebPage\",
\"@id\": \"";
// line 49
echo sw_escape_filter($this->env, $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SeoUrlFunctionExtension']->seoUrl("sas.frontend.blog.detail", ["articleId" => sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "id", [], "any", false, false, false, 49)]), "html", null, true);
echo "\"
},
\"publisher\": {
\"@type\": \"Organization\",
\"name\": \"";
// line 53
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["shopware"] ?? null), "config", [], "any", false, false, false, 53), "core", [], "any", false, false, false, 53), "basicInformation", [], "any", false, false, false, 53), "shopName", [], "any", false, false, false, 53), "html", null, true);
echo "\",
\"logo\": {
\"@type\": \"ImageObject\",
\"url\": \"";
// line 56
echo sw_escape_filter($this->env, $this->extensions['Shopware\Storefront\Framework\Twig\Extension\UrlEncodingTwigFilter']->encodeUrl((($__internal_compile_0 = sw_get_attribute($this->env, $this->source, ($context["shopware"] ?? null), "theme", [], "any", false, false, false, 56)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0["sw-logo-desktop"] ?? null) : null)), "html", null, true);
echo "\"
}
}
}
</script>
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@SasBlogModule/storefront/layout/meta.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 284 => 56, 278 => 53, 271 => 49, 267 => 47, 231 => 46, 229 => 45, 224 => 43, 218 => 40, 214 => 39, 210 => 38, 206 => 37, 200 => 33, 198 => 32, 192 => 30, 182 => 29, 170 => 26, 167 => 25, 164 => 24, 161 => 23, 158 => 22, 155 => 21, 152 => 20, 149 => 19, 146 => 18, 136 => 17, 109 => 15, 96 => 12, 93 => 11, 90 => 10, 87 => 9, 84 => 8, 81 => 7, 79 => 6, 74 => 5, 71 => 4, 61 => 3, 38 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
{% block layout_head_meta_tags %}
{% if activeRoute == 'sas.frontend.blog.detail' %}
<link rel=\"canonical\" href=\"{{ seoUrl('sas.frontend.blog.detail', { articleId: entry.id }) }}\" />
{% if entry.translated.metaTitle %}
{% set metaTitle = entry.translated.metaTitle|striptags|trim %}
{% else %}
{% set metaTitle = entry.translated.title|striptags|trim %}
{% endif %}
{% endif %}
{{ parent() }}
{% endblock %}
{% block layout_head_meta_tags_description %}{% if activeRoute == 'sas.frontend.blog.detail' %}{% if entry.translated.metaDescription %}{{ entry.translated.metaDescription|striptags|trim }}{% else %}{{ entry.translated.teaser }}{% endif %}{% else %}{{ parent() }}{% endif %}{% endblock %}
{% block layout_head_title %}
{% if activeRoute == 'sas.frontend.blog.detail' %}
{% if entry.translated.metaTitle %}
{% set metaTitle = entry.translated.metaTitle|striptags|trim %}
{% else %}
{% set metaTitle = entry.translated.title|striptags|trim %}
{% endif %}
{% endif %}
{{ parent() }}
{% endblock %}
{% block layout_head_meta_tags_schema_webpage %}
{{ parent() }}
{% if activeRoute == 'sas.frontend.blog.detail' %}
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org\",
\"@type\": \"BlogPosting\",
\"headline\": \"{{ entry.translated.title }}\",
\"datePublished\": \"{{ entry.publishedAt|date }}\",
\"dateModified\": \"{{ entry.updatedAt|date }}\",
\"description\": \"{{ entry.translated.teaser }}\",
\"author\": {
\"@type\": \"Person\",
\"name\": \"{{ entry.author.translated.name }}\"
},
{% if entry.media.thumbnails.elements|length %}
\"image\":[{% for item in entry.media.thumbnails.elements %}\"{{ item.url }}\"{{ loop.last ? '' : ',' }}{% endfor %}],{% endif %}
\"mainEntityOfPage\": {
\"@type\": \"WebPage\",
\"@id\": \"{{ seoUrl('sas.frontend.blog.detail', { articleId: entry.id }) }}\"
},
\"publisher\": {
\"@type\": \"Organization\",
\"name\": \"{{ shopware.config.core.basicInformation.shopName }}\",
\"logo\": {
\"@type\": \"ImageObject\",
\"url\": \"{{ shopware.theme['sw-logo-desktop'] |sw_encode_url }}\"
}
}
}
</script>
{% endif %}
{% endblock %}
", "@SasBlogModule/storefront/layout/meta.html.twig", "/srv/users/liamoriasw6/apps/liamoriasw6/custom/plugins/SasBlogModule/src/Resources/views/storefront/layout/meta.html.twig");
}
}