<?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;
/* front_v4/mca/blog/_balise_schema_org.html.twig */
class __TwigTemplate_ad6a0f984efafaee3f7ac5206bcdffe1e029ff26e5c9fb799be41a988ab89042 extends \Twig\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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front_v4/mca/blog/_balise_schema_org.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front_v4/mca/blog/_balise_schema_org.html.twig"));
// line 2
if (twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 2, $this->source); })()), "blogAuthor", [], "any", false, false, false, 2)) {
// line 3
echo " <meta name=\"author\" content=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 3, $this->source); })()), "blogAuthor", [], "any", false, false, false, 3), "fullName", [], "any", false, false, false, 3), "html", null, true);
echo "\">
";
}
// line 5
if (twig_get_attribute($this->env, $this->source, (isset($context["blogPost"]) || array_key_exists("blogPost", $context) ? $context["blogPost"] : (function () { throw new RuntimeError('Variable "blogPost" does not exist.', 5, $this->source); })()), "filename", [], "any", false, false, false, 5)) {
// line 6
echo " ";
$context["post_image_url"] = $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->env->getRuntime('Vich\UploaderBundle\Twig\Extension\UploaderExtensionRuntime')->asset((isset($context["blogPost"]) || array_key_exists("blogPost", $context) ? $context["blogPost"] : (function () { throw new RuntimeError('Variable "blogPost" does not exist.', 6, $this->source); })()), "imageFile"), "blog_post_main");
}
// line 8
echo "<meta property=\"og:type\" content=\"article\">
<meta property=\"og:title\" content=\"";
// line 9
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 9, $this->source); })()), "title", [], "any", false, false, false, 9), "html", null, true);
echo "\">
<meta property=\"og:image\" content=\"";
// line 10
echo twig_escape_filter($this->env, (isset($context["post_image_url"]) || array_key_exists("post_image_url", $context) ? $context["post_image_url"] : (function () { throw new RuntimeError('Variable "post_image_url" does not exist.', 10, $this->source); })()), "html", null, true);
echo "\">
<meta property=\"article:published_time\" content=\"";
// line 11
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 11, $this->source); })()), "createdAt", [], "any", false, false, false, 11), "Y-m-d"), "html", null, true);
echo "\">
";
// line 12
if (twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 12, $this->source); })()), "metaCustom", [], "any", false, false, false, 12)) {
// line 13
echo " ";
echo twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 13, $this->source); })()), "metaCustom", [], "any", false, false, false, 13);
echo "
";
}
// line 15
echo "<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org\",
\"@type\": \"Article\",
\"@id\": \"Article-";
// line 19
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 19, $this->source); })()), "id", [], "any", false, false, false, 19), "html", null, true);
echo "\",
\"mainEntityOfPage\": {
\"@type\": \"WebPage\",
\"@id\": \"";
// line 22
echo twig_escape_filter($this->env, ((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.', 22, $this->source); })()), "request", [], "any", false, false, false, 22), "getSchemeAndHttpHost", [], "any", false, false, false, 22) . 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.', 22, $this->source); })()), "request", [], "any", false, false, false, 22), "baseUrl", [], "any", false, false, false, 22)) . 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.', 22, $this->source); })()), "request", [], "any", false, false, false, 22), "pathInfo", [], "any", false, false, false, 22)), "html", null, true);
echo "\"
},
\"headline\": \"";
// line 24
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 24, $this->source); })()), "metaTitle", [], "any", false, false, false, 24), "html", null, true);
echo "\",
\"description\": \"";
// line 25
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 25, $this->source); })()), "metaDescription", [], "any", false, false, false, 25), "html", null, true);
echo "\",
\"image\": \"";
// line 26
echo twig_escape_filter($this->env, (isset($context["post_image_url"]) || array_key_exists("post_image_url", $context) ? $context["post_image_url"] : (function () { throw new RuntimeError('Variable "post_image_url" does not exist.', 26, $this->source); })()), "html", null, true);
echo "\",
";
// line 27
if (twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 27, $this->source); })()), "blogAuthor", [], "any", false, false, false, 27)) {
// line 28
echo " \"author\": {
\"@type\": \"Person\",
\"name\": \"";
// line 30
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 30, $this->source); })()), "blogAuthor", [], "any", false, false, false, 30), "fullName", [], "any", false, false, false, 30), "html", null, true);
echo "\"
},
";
}
// line 33
echo " \"publisher\": {
\"@type\": \"Organization\",
\"name\": \"Mon centre auditif\",
\"logo\": {
\"@type\": \"ImageObject\",
\"url\": \"https://mon-centre-auditif.com/build/mca_logo_horizontal.png\"
}
},
\"datePublished\": \"";
// line 41
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 41, $this->source); })()), "createdAt", [], "any", false, false, false, 41), "Y-m-d"), "html", null, true);
echo "\",
\"dateModified\": \"";
// line 42
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 42, $this->source); })()), "updatedAt", [], "any", false, false, false, 42), "Y-m-d"), "html", null, true);
echo "\"
";
// line 43
if (twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 43, $this->source); })()), "metaSchema", [], "any", false, false, false, 43)) {
// line 44
echo " ,
";
// line 45
echo twig_slice($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 45, $this->source); })()), "metaSchema", [], "any", false, false, false, 45), 1, -1);
echo "
";
}
// line 47
echo "}
</script>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "front_v4/mca/blog/_balise_schema_org.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 149 => 47, 144 => 45, 141 => 44, 139 => 43, 135 => 42, 131 => 41, 121 => 33, 115 => 30, 111 => 28, 109 => 27, 105 => 26, 101 => 25, 97 => 24, 92 => 22, 86 => 19, 80 => 15, 74 => 13, 72 => 12, 68 => 11, 64 => 10, 60 => 9, 57 => 8, 53 => 6, 51 => 5, 45 => 3, 43 => 2,);
}
public function getSourceContext()
{
return new Source("{# Post author #}
{% if post.blogAuthor %}
<meta name=\"author\" content=\"{{ post.blogAuthor.fullName }}\">
{% endif %}
{% if blogPost.filename %}
{% set post_image_url = vich_uploader_asset(blogPost, 'imageFile') | imagine_filter('blog_post_main') %}
{% endif %}
<meta property=\"og:type\" content=\"article\">
<meta property=\"og:title\" content=\"{{ post.title }}\">
<meta property=\"og:image\" content=\"{{ post_image_url }}\">
<meta property=\"article:published_time\" content=\"{{ post.createdAt|date('Y-m-d') }}\">
{% if post.metaCustom %}
{{ post.metaCustom|raw }}
{% endif %}
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org\",
\"@type\": \"Article\",
\"@id\": \"Article-{{ post.id }}\",
\"mainEntityOfPage\": {
\"@type\": \"WebPage\",
\"@id\": \"{{ app.request.getSchemeAndHttpHost ~ app.request.baseUrl ~ app.request.pathInfo }}\"
},
\"headline\": \"{{ post.metaTitle }}\",
\"description\": \"{{ post.metaDescription }}\",
\"image\": \"{{ post_image_url }}\",
{% if post.blogAuthor %}
\"author\": {
\"@type\": \"Person\",
\"name\": \"{{ post.blogAuthor.fullName }}\"
},
{% endif %}
\"publisher\": {
\"@type\": \"Organization\",
\"name\": \"Mon centre auditif\",
\"logo\": {
\"@type\": \"ImageObject\",
\"url\": \"https://mon-centre-auditif.com/build/mca_logo_horizontal.png\"
}
},
\"datePublished\": \"{{ post.createdAt|date('Y-m-d') }}\",
\"dateModified\": \"{{ post.updatedAt|date('Y-m-d') }}\"
{% if post.metaSchema %}
,
{{ post.metaSchema[1:-1]|raw }}
{% endif %}
}
</script>", "front_v4/mca/blog/_balise_schema_org.html.twig", "/var/www/hearing_store_locator/templates/front_v4/mca/blog/_balise_schema_org.html.twig");
}
}