<?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;
/* Block/etuna_item_ranking.twig */
class __TwigTemplate_15852d497c291e1d40c6c883cd1f68a77d670fb903ee5b8232d3f962e55f5259 extends \Eccube\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", "Block/etuna_item_ranking.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/etuna_item_ranking.twig"));
// line 9
echo "
";
// line 11
if ( !twig_test_empty((isset($context["ItemRanking"]) || array_key_exists("ItemRanking", $context) ? $context["ItemRanking"] : (function () { throw new RuntimeError('Variable "ItemRanking" does not exist.', 11, $this->source); })()))) {
// line 12
echo " <section class=\"ranking\">
<div class=\"container\">
";
// line 14
if ((twig_get_attribute($this->env, $this->source, (isset($context["Config"]) || array_key_exists("Config", $context) ? $context["Config"] : (function () { throw new RuntimeError('Variable "Config" does not exist.', 14, $this->source); })()), "item_ranking_title", [], "any", false, false, false, 14) != "")) {
// line 15
echo " <h2 class=\"section-title\">
<span class=\"_sub\">
RANKING
</span>
<span class=\"_main\">
";
// line 20
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Config"]) || array_key_exists("Config", $context) ? $context["Config"] : (function () { throw new RuntimeError('Variable "Config" does not exist.', 20, $this->source); })()), "item_ranking_title", [], "any", false, false, false, 20), "html", null, true);
echo "
</span>
</h2>
";
}
// line 24
echo " <div class=\"ranking__content\">
<div class=\"ranking__list\">
";
// line 27
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["ItemRanking"]) || array_key_exists("ItemRanking", $context) ? $context["ItemRanking"] : (function () { throw new RuntimeError('Variable "ItemRanking" does not exist.', 27, $this->source); })()));
$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"]) {
// line 28
echo "
<a class=\"ranking__item card-rank\" href=\"";
// line 29
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 29)]), "html", null, true);
echo "\">
";
// line 30
if ((twig_get_attribute($this->env, $this->source, (isset($context["Config"]) || array_key_exists("Config", $context) ? $context["Config"] : (function () { throw new RuntimeError('Variable "Config" does not exist.', 30, $this->source); })()), "item_ranking_disp_title", [], "any", false, false, false, 30) == 1)) {
// line 31
echo " <div class=\"card-rank__rank\">
<span class=\"num\">
";
// line 33
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 33), "html", null, true);
echo "
</span>
位
</div>
";
}
// line 38
echo "
";
// line 39
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["item"], "ProductImage", [], "any", false, false, false, 39));
$context['_iterated'] = false;
$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["image"]) {
// line 40
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 40)) {
// line 41
echo " <div class=\"card-rank__img\">
<img src=\"";
// line 42
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["image"], "save_image"), "html", null, true);
echo "\">
</div>
";
}
// line 45
echo " ";
$context['_iterated'] = true;
++$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'];
}
}
if (!$context['_iterated']) {
// line 46
echo " <div class=\"card-rank__img\">
<img src=\"";
// line 47
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html", null, true);
echo "\"/>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['image'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 50
echo " ";
if ((twig_get_attribute($this->env, $this->source, (isset($context["Config"]) || array_key_exists("Config", $context) ? $context["Config"] : (function () { throw new RuntimeError('Variable "Config" does not exist.', 50, $this->source); })()), "item_ranking_disp_title", [], "any", false, false, false, 50) == 1)) {
// line 51
echo " <h3 class=\"card-rank__title\">
";
// line 52
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 52), "html", null, true);
echo "
</h3>
";
}
// line 55
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["item"], "author_name", [], "any", false, false, false, 55)) {
// line 56
echo " <p class=\"card-rank__author\">
著者:";
// line 57
echo twig_nl2br(twig_get_attribute($this->env, $this->source, $context["item"], "author_name", [], "any", false, false, false, 57));
echo "
</p>
";
}
// line 60
echo " </a>
";
++$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;
// line 62
echo " </div>
</div>
</div>
</section>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "Block/etuna_item_ranking.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 209 => 62, 194 => 60, 188 => 57, 185 => 56, 182 => 55, 176 => 52, 173 => 51, 170 => 50, 161 => 47, 158 => 46, 145 => 45, 139 => 42, 136 => 41, 133 => 40, 115 => 39, 112 => 38, 104 => 33, 100 => 31, 98 => 30, 94 => 29, 91 => 28, 74 => 27, 69 => 24, 62 => 20, 55 => 15, 53 => 14, 49 => 12, 47 => 11, 43 => 9,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) Takashi Otaki All Rights Reserved.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% if ItemRanking is not empty %}
<section class=\"ranking\">
<div class=\"container\">
{% if Config.item_ranking_title != \"\" %}
<h2 class=\"section-title\">
<span class=\"_sub\">
RANKING
</span>
<span class=\"_main\">
{{ Config.item_ranking_title }}
</span>
</h2>
{% endif %}
<div class=\"ranking__content\">
<div class=\"ranking__list\">
{% for item in ItemRanking %}
<a class=\"ranking__item card-rank\" href=\"{{ url('product_detail', {'id': item.id}) }}\">
{% if Config.item_ranking_disp_title == 1 %}
<div class=\"card-rank__rank\">
<span class=\"num\">
{{ loop.index }}
</span>
位
</div>
{% endif %}
{% for image in item.ProductImage %}
{% if loop.first %}
<div class=\"card-rank__img\">
<img src=\"{{ asset(image, 'save_image') }}\">
</div>
{% endif %}
{% else %}
<div class=\"card-rank__img\">
<img src=\"{{ asset(''|no_image_product, 'save_image') }}\"/>
</div>
{%endfor%}
{% if Config.item_ranking_disp_title == 1 %}
<h3 class=\"card-rank__title\">
{{ item.name }}
</h3>
{% endif %}
{% if item.author_name %}
<p class=\"card-rank__author\">
著者:{{ item.author_name|raw|nl2br }}
</p>
{% endif %}
</a>
{% endfor %}
</div>
</div>
</div>
</section>
{% endif %}", "Block/etuna_item_ranking.twig", "/home/saicomp/stg-site.jp/public_html/cosmo-test3.stg-site.jp/app/template/default/Block/etuna_item_ranking.twig");
}
}