<?php
use Twig\Environment;
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;
/* head/metas.html.twig */
class __TwigTemplate_b9154528d77d8a8a62dcee170bfdbfa1 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "head/metas.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "head/metas.html.twig"));
// line 1
echo "
";
// line 3
$context["metaOg"] = "";
// line 4
echo "
";
// line 5
if (call_user_func_array($this->env->getTest('instanceof')->getCallable(), [(isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 5, $this->source); })()), "\\Pimcore\\Model\\Document\\Page"])) {
// line 6
echo " ";
// line 7
echo "
";
// line 8
if (array_key_exists("recette", $context)) {
// line 9
echo " ";
// line 10
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_title')->getCallable(), []), "set", [0 => twig_get_attribute($this->env, $this->source, (isset($context["recette"]) || array_key_exists("recette", $context) ? $context["recette"] : (function () { throw new RuntimeError('Variable "recette" does not exist.', 10, $this->source); })()), "nom", [], "any", false, false, false, 10)], "method", false, false, false, 10);
// line 11
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "appendName", [0 => "description", 1 => twig_get_attribute($this->env, $this->source, (isset($context["recette"]) || array_key_exists("recette", $context) ? $context["recette"] : (function () { throw new RuntimeError('Variable "recette" does not exist.', 11, $this->source); })()), "description", [], "any", false, false, false, 11)], "method", false, false, false, 11);
// line 12
echo "
";
// line 13
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "setProperty", [0 => "og:type", 1 => "website"], "method", false, false, false, 13);
// line 14
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "setProperty", [0 => "og:url", 1 => twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 14, $this->source); })()), "fullpath", [], "any", false, false, false, 14)], "method", false, false, false, 14);
// line 15
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "setProperty", [0 => "og:title", 1 => twig_get_attribute($this->env, $this->source, (isset($context["recette"]) || array_key_exists("recette", $context) ? $context["recette"] : (function () { throw new RuntimeError('Variable "recette" does not exist.', 15, $this->source); })()), "nom", [], "any", false, false, false, 15)], "method", false, false, false, 15);
// line 16
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "setProperty", [0 => "og:description", 1 => twig_get_attribute($this->env, $this->source, (isset($context["recette"]) || array_key_exists("recette", $context) ? $context["recette"] : (function () { throw new RuntimeError('Variable "recette" does not exist.', 16, $this->source); })()), "description", [], "any", false, false, false, 16)], "method", false, false, false, 16);
// line 17
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "setProperty", [0 => "og:image", 1 => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 17, $this->source); })()), "request", [], "any", false, false, false, 17), "getSchemeAndHttpHost", [0 => twig_get_attribute($this->env, $this->source, (isset($context["recette"]) || array_key_exists("recette", $context) ? $context["recette"] : (function () { throw new RuntimeError('Variable "recette" does not exist.', 17, $this->source); })()), "photo", [], "any", false, false, false, 17)], "method", false, false, false, 17)], "method", false, false, false, 17);
// line 18
echo "
";
} else {
// line 20
echo " ";
// line 21
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_title')->getCallable(), []), "set", [0 => twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 21, $this->source); })()), "getTitle", [], "method", false, false, false, 21)], "method", false, false, false, 21);
// line 22
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "appendName", [0 => "description", 1 => twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 22, $this->source); })()), "getDescription", [], "method", false, false, false, 22)], "method", false, false, false, 22);
// line 23
echo "
";
// line 24
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "setProperty", [0 => "og:type", 1 => "website"], "method", false, false, false, 24);
// line 25
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "setProperty", [0 => "og:url", 1 => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 25, $this->source); })()), "request", [], "any", false, false, false, 25), "getSchemeAndHttpHost", [0 => twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 25, $this->source); })()), "fullpath", [], "any", false, false, false, 25)], "method", false, false, false, 25)], "method", false, false, false, 25);
// line 26
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "setProperty", [0 => "og:title", 1 => twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 26, $this->source); })()), "getTitle", [], "method", false, false, false, 26)], "method", false, false, false, 26);
// line 27
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "setProperty", [0 => "og:description", 1 => twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 27, $this->source); })()), "getDescription", [], "method", false, false, false, 27)], "method", false, false, false, 27);
// line 28
echo " ";
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []), "setProperty", [0 => "og:image", 1 => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 28, $this->source); })()), "request", [], "any", false, false, false, 28), "getSchemeAndHttpHost", [], "method", false, false, false, 28)], "method", false, false, false, 28);
// line 29
echo " ";
}
}
// line 31
echo "
";
// line 32
$context["websiteName"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Your website name");
// line 33
echo "
";
// line 34
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_head_title')->getCallable(), []), "setSeparator", [0 => " / "], "method", false, false, false, 34);
// line 35
call_user_func_array($this->env->getFunction('pimcore_head_title')->getCallable(), [(isset($context["websiteName"]) || array_key_exists("websiteName", $context) ? $context["websiteName"] : (function () { throw new RuntimeError('Variable "websiteName" does not exist.', 35, $this->source); })())]);
// line 36
echo "
";
// line 37
echo call_user_func_array($this->env->getFunction('pimcore_head_title')->getCallable(), []);
echo "
";
// line 38
echo call_user_func_array($this->env->getFunction('pimcore_head_meta')->getCallable(), []);
echo "
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
";
// line 42
echo $this->extensions['App\Twig\Extension\Apik']->getRobotsIndex();
echo "
";
// line 43
echo $this->extensions['App\Twig\Extension\Apik']->getLinksAlternate((isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 43, $this->source); })()));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "head/metas.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 149 => 43, 145 => 42, 138 => 38, 134 => 37, 131 => 36, 129 => 35, 127 => 34, 124 => 33, 122 => 32, 119 => 31, 115 => 29, 112 => 28, 109 => 27, 106 => 26, 103 => 25, 101 => 24, 98 => 23, 95 => 22, 92 => 21, 90 => 20, 86 => 18, 83 => 17, 80 => 16, 77 => 15, 74 => 14, 72 => 13, 69 => 12, 66 => 11, 63 => 10, 61 => 9, 59 => 8, 56 => 7, 54 => 6, 52 => 5, 49 => 4, 47 => 3, 43 => 1,);
}
public function getSourceContext()
{
return new Source("
{% set metaOg = \"\" %}
{% if document is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Page') %}
{# ...à partir des champs personnalisés d'un Data Object #}
{% if recette is defined %}
{# Titre et metadescription #}
{% do pimcore_head_title().set(recette.nom) %}
{% do pimcore_head_meta().appendName('description', recette.description) %}
{% do pimcore_head_meta().setProperty('og:type', 'website') %}
{% do pimcore_head_meta().setProperty('og:url', document.fullpath) %}
{% do pimcore_head_meta().setProperty('og:title', recette.nom) %}
{% do pimcore_head_meta().setProperty('og:description', recette.description) %}
{% do pimcore_head_meta().setProperty('og:image', app.request.getSchemeAndHttpHost(recette.photo)) %}
{% else %}
{# Titre et metadescription #}
{% do pimcore_head_title().set(document.getTitle()) %}
{% do pimcore_head_meta().appendName('description', document.getDescription()) %}
{% do pimcore_head_meta().setProperty('og:type', 'website') %}
{% do pimcore_head_meta().setProperty('og:url', app.request.getSchemeAndHttpHost(document.fullpath)) %}
{% do pimcore_head_meta().setProperty('og:title', document.getTitle()) %}
{% do pimcore_head_meta().setProperty('og:description', document.getDescription()) %}
{% do pimcore_head_meta().setProperty('og:image', app.request.getSchemeAndHttpHost()) %}
{% endif %}
{% endif %}
{% set websiteName = \"Your website name\"|trans %}
{% do pimcore_head_title().setSeparator(' / ') %}
{% do pimcore_head_title(websiteName) %}
{{ pimcore_head_title() }}
{{ pimcore_head_meta() }}
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
{{ get_robots_index()|raw }}
{{ get_links_alternate(document)|raw }}", "head/metas.html.twig", "/var/www/magnecapsv2.atypic-pp.be/www/templates/head/metas.html.twig");
}
}