<?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;
/* @VisualMediaBreadcrumb/Breadcrumb/breadcrumb.html.twig */
class __TwigTemplate_66dd6202c287c2cbed9cf3c7f704b480d666621b91cda9c697f91bd352cac9fa 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", "@VisualMediaBreadcrumb/Breadcrumb/breadcrumb.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@VisualMediaBreadcrumb/Breadcrumb/breadcrumb.html.twig"));
// line 2
$context["breadcrumbs"] = $this->extensions['VisualMedia\BreadcrumbBundle\Twig\TwigBreadcrumb']->breadcrumb((((isset($context["name"]) || array_key_exists("name", $context))) ? (_twig_default_filter((isset($context["name"]) || array_key_exists("name", $context) ? $context["name"] : (function () { throw new RuntimeError('Variable "name" does not exist.', 2, $this->source); })()), "Menu")) : ("Menu")), (((isset($context["options"]) || array_key_exists("options", $context))) ? (_twig_default_filter((isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 2, $this->source); })()), [])) : ([])));
// line 3
echo "
<div class=\"breadcrumb-nav\">
<ol itemscope itemtype=\"http://schema.org/BreadcrumbList\" class=\"breadcrumb\">
<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\">
<a itemprop=\"item\" href=\"";
// line 7
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("home");
echo "\">
<span itemprop=\"name\">Home</span>
</a>
<meta itemprop=\"position\" content=\"1\" />
<i class=\"fas fa-arrow-right\"></i>
</li>
";
// line 15
echo " ";
$context["position"] = 2;
// line 16
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["breadcrumbs"]) || array_key_exists("breadcrumbs", $context) ? $context["breadcrumbs"] : (function () { throw new RuntimeError('Variable "breadcrumbs" does not exist.', 16, $this->source); })()), "paths", [], "any", false, false, false, 16));
$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["breadcrumb"]) {
// line 17
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 17)) {
// line 18
echo " <li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\">
<span itemprop=\"name\">";
// line 19
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "title", [], "any", false, false, false, 19), "html", null, true);
echo "</span>
<meta itemprop=\"position\" content=\"";
// line 20
echo twig_escape_filter($this->env, (isset($context["position"]) || array_key_exists("position", $context) ? $context["position"] : (function () { throw new RuntimeError('Variable "position" does not exist.', 20, $this->source); })()), "html", null, true);
echo "\" />
</li>
";
} else {
// line 24
echo " <li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\">
<a itemprop=\"item\" href=\"";
// line 25
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "link", [], "any", false, false, false, 25), "html", null, true);
echo "\">
<span itemprop=\"name\">";
// line 26
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "title", [], "any", false, false, false, 26), "html", null, true);
echo "</span>
</a>
<meta itemprop=\"position\" content=\"";
// line 28
echo twig_escape_filter($this->env, (isset($context["position"]) || array_key_exists("position", $context) ? $context["position"] : (function () { throw new RuntimeError('Variable "position" does not exist.', 28, $this->source); })()), "html", null, true);
echo "\" />
<i class=\"fas fa-arrow-right\"></i>
</li>
";
}
// line 32
echo " ";
$context["position"] = ((isset($context["position"]) || array_key_exists("position", $context) ? $context["position"] : (function () { throw new RuntimeError('Variable "position" does not exist.', 32, $this->source); })()) + 1);
// line 33
echo " ";
++$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['breadcrumb'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
echo " </ol>
</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "@VisualMediaBreadcrumb/Breadcrumb/breadcrumb.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 135 => 34, 121 => 33, 118 => 32, 111 => 28, 106 => 26, 102 => 25, 99 => 24, 92 => 20, 88 => 19, 85 => 18, 82 => 17, 64 => 16, 61 => 15, 51 => 7, 45 => 3, 43 => 2,);
}
public function getSourceContext()
{
return new Source("{# http://schema.org/BreadcrumbList #}
{% set breadcrumbs = breadcrumb(name|default('Menu'), options|default({})) %}
<div class=\"breadcrumb-nav\">
<ol itemscope itemtype=\"http://schema.org/BreadcrumbList\" class=\"breadcrumb\">
<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\">
<a itemprop=\"item\" href=\"{{ path('home') }}\">
<span itemprop=\"name\">Home</span>
</a>
<meta itemprop=\"position\" content=\"1\" />
<i class=\"fas fa-arrow-right\"></i>
</li>
{# breadcrumb itemprop position, starts at 2, 1 is homepage #}
{% set position = 2 %}
{% for breadcrumb in breadcrumbs.paths %}
{% if loop.last %}
<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\">
<span itemprop=\"name\">{{ breadcrumb.title }}</span>
<meta itemprop=\"position\" content=\"{{ position }}\" />
</li>
{% else %}
<li itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\">
<a itemprop=\"item\" href=\"{{ breadcrumb.link }}\">
<span itemprop=\"name\">{{ breadcrumb.title }}</span>
</a>
<meta itemprop=\"position\" content=\"{{ position }}\" />
<i class=\"fas fa-arrow-right\"></i>
</li>
{% endif %}
{% set position = position + 1 %}
{% endfor %}
</ol>
</div>
", "@VisualMediaBreadcrumb/Breadcrumb/breadcrumb.html.twig", "/var/www/vhosts/localhost/html/templates/VisualMediaBreadcrumbBundle/views/Breadcrumb/breadcrumb.html.twig");
}
}