<?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_1625932ec874072406202a2e4496fe9ba54e80bfb6bd311675e908910fd5a660 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_image_og' => [$this, 'block_layout_head_meta_tags_image_og'],
'layout_head_meta_tags_image_twitter' => [$this, 'block_layout_head_meta_tags_image_twitter'],
'layout_head_meta_tags_image_meta' => [$this, 'block_layout_head_meta_tags_image_meta'],
'layout_head_meta_tags_schema_webpage' => [$this, 'block_layout_head_meta_tags_schema_webpage'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@SolidAdvancedSliderElements/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"));
// line 3
if (((0 === twig_compare(($context["activeRoute"] ?? null), "sas.frontend.blog.detail")) && sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "media", [], "any", false, false, false, 3), "url", [], "any", false, false, false, 3))) {
// line 4
$context["metaImage"] = twig_trim_filter(twig_striptags(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["entry"] ?? null), "media", [], "any", false, false, false, 4), "url", [], "any", false, false, false, 4)));
}
// line 2
$this->parent = $this->loadTemplate("@SolidAdvancedSliderElements/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 7
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 8
echo " ";
if ((0 === twig_compare(($context["activeRoute"] ?? null), "sas.frontend.blog.detail"))) {
// line 9
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, 9)]), "html", null, true);
echo "\"/>
";
}
// line 11
echo " ";
$this->displayParentBlock("layout_head_meta_tags", $context, $blocks);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 14
public function block_layout_head_meta_tags_image_og($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_image_og"));
$__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_image_og"));
(((array_key_exists("metaImage", $context) && !(null === ($context["metaImage"] ?? null)))) ? (print (sw_escape_filter($this->env, ($context["metaImage"] ?? null), "html", null, true))) : (print ($this->renderParentBlock("layout_head_meta_tags_image_og", $context, $blocks))));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 15
public function block_layout_head_meta_tags_image_twitter($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_image_twitter"));
$__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_image_twitter"));
(((array_key_exists("metaImage", $context) && !(null === ($context["metaImage"] ?? null)))) ? (print (sw_escape_filter($this->env, ($context["metaImage"] ?? null), "html", null, true))) : (print ($this->renderParentBlock("layout_head_meta_tags_image_twitter", $context, $blocks))));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 16
public function block_layout_head_meta_tags_image_meta($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_image_meta"));
$__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_image_meta"));
(((array_key_exists("metaImage", $context) && !(null === ($context["metaImage"] ?? null)))) ? (print (sw_escape_filter($this->env, ($context["metaImage"] ?? null), "html", null, true))) : (print ($this->renderParentBlock("layout_head_meta_tags_image_meta", $context, $blocks))));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 18
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 19
echo " ";
$this->displayParentBlock("layout_head_meta_tags_schema_webpage", $context, $blocks);
echo "
";
// line 21
if ((0 === twig_compare(($context["activeRoute"] ?? null), "sas.frontend.blog.detail"))) {
// line 22
echo " <script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org\",
\"@type\": \"BlogPosting\",
\"headline\": \"";
// line 26
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, 26), "title", [], "any", false, false, false, 26), "html", null, true);
echo "\",
\"datePublished\": \"";
// line 27
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, 27)), "html", null, true);
echo "\",
\"dateModified\": \"";
// line 28
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, 28)), "html", null, true);
echo "\",
\"description\": \"";
// line 29
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, 29), "teaser", [], "any", false, false, false, 29), "html", null, true);
echo "\",
\"author\": {
\"@type\": \"Person\",
\"name\": \"";
// line 32
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, 32), "translated", [], "any", false, false, false, 32), "name", [], "any", false, false, false, 32), "html", null, true);
echo "\"
},
";
// line 34
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, 34), "thumbnails", [], "any", false, false, false, 34), "elements", [], "any", false, false, false, 34))) {
// line 35
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, 35), "thumbnails", [], "any", false, false, false, 35), "elements", [], "any", false, false, false, 35));
$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, 35), "html", null, true);
echo "\"";
echo ((sw_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 35)) ? ("") : (","));
++$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 36
echo " \"mainEntityOfPage\": {
\"@type\": \"WebPage\",
\"@id\": \"";
// line 38
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, 38)]), "html", null, true);
echo "\"
},
\"publisher\": {
\"@type\": \"Organization\",
\"name\": \"";
// line 42
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, 42), "core", [], "any", false, false, false, 42), "basicInformation", [], "any", false, false, false, 42), "shopName", [], "any", false, false, false, 42), "html", null, true);
echo "\",
\"logo\": {
\"@type\": \"ImageObject\",
\"url\": \"";
// line 45
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, 45)) && 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 ( 259 => 45, 253 => 42, 246 => 38, 242 => 36, 206 => 35, 204 => 34, 199 => 32, 193 => 29, 189 => 28, 185 => 27, 181 => 26, 175 => 22, 173 => 21, 167 => 19, 157 => 18, 138 => 16, 119 => 15, 100 => 14, 87 => 11, 81 => 9, 78 => 8, 68 => 7, 57 => 2, 54 => 4, 52 => 3, 39 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
{% if activeRoute == 'sas.frontend.blog.detail' and entry.media.url %}
{% set metaImage = entry.media.url|striptags|trim %}
{% endif %}
{% block layout_head_meta_tags %}
{% if activeRoute == 'sas.frontend.blog.detail' %}
<link rel=\"canonical\" href=\"{{ seoUrl('sas.frontend.blog.detail', { articleId: entry.id }) }}\"/>
{% endif %}
{{ parent() }}
{% endblock %}
{% block layout_head_meta_tags_image_og %}{{ metaImage ?? parent() }}{% endblock %}
{% block layout_head_meta_tags_image_twitter %}{{ metaImage ?? parent() }}{% endblock %}
{% block layout_head_meta_tags_image_meta %}{{ metaImage ?? 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", "/var/customers/webs/youksakka/htdocs/custom/plugins/SasBlogModule/src/Resources/views/storefront/layout/meta.html.twig");
}
}