<?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;
/* @TabaCMS2/default/list_blog.twig */
class __TwigTemplate_90d59b1a61aac16a0693cde400313250 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'javascript' => [$this, 'block_javascript'],
'stylesheet' => [$this, 'block_stylesheet'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 7
return "default_frame.twig";
}
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", "@TabaCMS2/default/list_blog.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@TabaCMS2/default/list_blog.twig"));
// line 10
$context["post_list"] = $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->postList();
// line 7
$this->parent = $this->loadTemplate("default_frame.twig", "@TabaCMS2/default/list_blog.twig", 7);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 12
public function block_javascript($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(), "block", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 13
echo $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->asset("script.js", "script");
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 16
public function block_stylesheet($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(), "block", "stylesheet"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 17
echo $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->asset("style.css", "style");
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 20
public function block_main($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(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 21
echo "<div class=\"container-lg\">
<div class=\"row\">
<div class=\"col-12\">
<div class=\"ec-pageHeader\"><h1>";
// line 24
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 24, $this->source); })()), "getTypeName", [], "any", false, false, true, 24), 24, $this->source), "html", null, true);
echo "</h1></div>
</div>
</div>
<div class=\"row\">
<div class=\"col-md-9\">
<ul class=\"row tabacms_blog_list tabacms_height_match\">
";
// line 30
$context["no_image"] = $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->asset("no_image.jpg");
// line 31
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["post_list"]) || array_key_exists("post_list", $context) ? $context["post_list"] : (function () { throw new RuntimeError('Variable "post_list" does not exist.', 31, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
// line 32
echo " <li class=\"col-sm-6 col-md-4\">
<article>
<div class=\"tabacms_thumbnail_wrapper\">
<div class=\"tabacms_thumbnail\">
";
// line 36
$context["thumb"] = (isset($context["no_image"]) || array_key_exists("no_image", $context) ? $context["no_image"] : (function () { throw new RuntimeError('Variable "no_image" does not exist.', 36, $this->source); })());
// line 37
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["post"], "getThumbnail", [], "any", false, false, true, 37))) {
// line 38
echo " ";
$context["thumb"] = $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getThumbnail", [], "any", false, false, true, 38), 38, $this->source), "save_image");
// line 39
echo " ";
}
// line 40
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["post"], "getContentDiv", [], "any", false, false, true, 40) == twig_constant("CONTENT_DIV_BODY", $context["post"]))) {
// line 41
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getURI", [], "any", false, false, true, 41), 41, $this->source), "html", null, true);
echo "\"><img src=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["thumb"]) || array_key_exists("thumb", $context) ? $context["thumb"] : (function () { throw new RuntimeError('Variable "thumb" does not exist.', 41, $this->source); })()), 41, $this->source), "html", null, true);
echo "\"></a>
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 42
$context["post"], "getContentDiv", [], "any", false, false, true, 42) == twig_constant("CONTENT_DIV_LINK", $context["post"]))) {
// line 43
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getLinkUrl", [], "any", false, false, true, 43), 43, $this->source), "html", null, true);
echo "\" ";
if (twig_get_attribute($this->env, $this->source, $context["post"], "getLinkTarget", [], "any", false, false, true, 43)) {
echo " target=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getLinkTarget", [], "any", false, false, true, 43), 43, $this->source), "html", null, true);
echo "\" ";
}
echo "><img src=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["thumb"]) || array_key_exists("thumb", $context) ? $context["thumb"] : (function () { throw new RuntimeError('Variable "thumb" does not exist.', 43, $this->source); })()), 43, $this->source), "html", null, true);
echo "\"></a>
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 44
$context["post"], "getContentDiv", [], "any", false, false, true, 44) == twig_constant("CONTENT_DIV_TITLE", $context["post"]))) {
// line 45
echo " <img src=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["thumb"]) || array_key_exists("thumb", $context) ? $context["thumb"] : (function () { throw new RuntimeError('Variable "thumb" does not exist.', 45, $this->source); })()), 45, $this->source), "html", null, true);
echo "\">
";
}
// line 47
echo " </div>
</div>
<div class=\"tabacms_detail\">
";
// line 50
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["post"], "getCategory", [], "any", false, false, true, 50))) {
// line 51
echo " <label class=\"text-nowrap tabacms_category_";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "getType", [], "any", false, false, true, 51), "getDataKey", [], "any", false, false, true, 51), 51, $this->source), "html", null, true);
echo "_";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "getCategory", [], "any", false, false, true, 51), "getDataKey", [], "any", false, false, true, 51), 51, $this->source), "html", null, true);
echo "\" ";
echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "getCategory", [], "any", false, false, true, 51), "getTagAttributes", [], "any", false, false, true, 51), 51, $this->source);
echo ">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "getCategory", [], "any", false, false, true, 51), "getCategoryName", [], "any", false, false, true, 51), 51, $this->source), "html", null, true);
echo "</label>
";
}
// line 53
echo " <time>
";
// line 54
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getPublicDate", [], "any", false, false, true, 54), 54, $this->source), "Y/m/d"), "html", null, true);
echo "
</time>
";
// line 56
if ((twig_get_attribute($this->env, $this->source, $context["post"], "getContentDiv", [], "any", false, false, true, 56) == twig_constant("CONTENT_DIV_BODY", $context["post"]))) {
// line 57
echo " <h2 class=\"tabacms_ellipsis_2\">
<a href=\"";
// line 58
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getURI", [], "any", false, false, true, 58), 58, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getTitle", [], "any", false, false, true, 58), 58, $this->source), "html", null, true);
echo "</a>
</h2>
<p class=\"tabacms_ellipsis_3\">
";
// line 61
echo twig_striptags($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getBody", [], "any", false, false, true, 61), 61, $this->source));
echo "
</p>
<a href=\"";
// line 63
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getURI", [], "any", false, false, true, 63), 63, $this->source), "html", null, true);
echo "\" class=\"tabacms_readmore\">もっと読む</a>
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 64
$context["post"], "getContentDiv", [], "any", false, false, true, 64) == twig_constant("CONTENT_DIV_LINK", $context["post"]))) {
// line 65
echo " <h2 class=\"tabacms_ellipsis_2\">
<a href=\"";
// line 66
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getLinkUrl", [], "any", false, false, true, 66), 66, $this->source), "html", null, true);
echo "\" ";
if (twig_get_attribute($this->env, $this->source, $context["post"], "getLinkTarget", [], "any", false, false, true, 66)) {
echo " target=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getLinkTarget", [], "any", false, false, true, 66), 66, $this->source), "html", null, true);
echo "\" ";
}
echo ">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getTitle", [], "any", false, false, true, 66), 66, $this->source), "html", null, true);
echo "</a>
</h2>
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 68
$context["post"], "getContentDiv", [], "any", false, false, true, 68) == twig_constant("CONTENT_DIV_TITLE", $context["post"]))) {
// line 69
echo " <h2 class=\"tabacms_ellipsis_2\">
";
// line 70
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["post"], "getTitle", [], "any", false, false, true, 70), 70, $this->source), "html", null, true);
echo "
</h2>
";
}
// line 73
echo " </div>
</article>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 77
echo " </ul>
";
// line 78
if ((twig_get_attribute($this->env, $this->source, (isset($context["post_list"]) || array_key_exists("post_list", $context) ? $context["post_list"] : (function () { throw new RuntimeError('Variable "post_list" does not exist.', 78, $this->source); })()), "totalItemCount", [], "any", false, false, true, 78) > 0)) {
// line 79
echo " ";
$this->loadTemplate("pager.twig", "@TabaCMS2/default/list_blog.twig", 79)->display(twig_array_merge($context, ["pages" => twig_get_attribute($this->env, $this->source, (isset($context["post_list"]) || array_key_exists("post_list", $context) ? $context["post_list"] : (function () { throw new RuntimeError('Variable "post_list" does not exist.', 79, $this->source); })()), "paginationData", [], "any", false, false, true, 79)]));
// line 80
echo " ";
}
// line 81
echo " </div>
<div class=\"col-md-3\">
";
// line 83
echo $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->widget("search");
echo "
";
// line 84
echo $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->widget("category");
echo "
";
// line 85
echo $this->extensions['Plugin\TabaCMS2\Twig\Extension\TwigExtension']->widget("tag");
echo "
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@TabaCMS2/default/list_blog.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 300 => 85, 296 => 84, 292 => 83, 288 => 81, 285 => 80, 282 => 79, 280 => 78, 277 => 77, 268 => 73, 262 => 70, 259 => 69, 257 => 68, 244 => 66, 241 => 65, 239 => 64, 235 => 63, 230 => 61, 222 => 58, 219 => 57, 217 => 56, 212 => 54, 209 => 53, 197 => 51, 195 => 50, 190 => 47, 184 => 45, 182 => 44, 169 => 43, 167 => 42, 160 => 41, 157 => 40, 154 => 39, 151 => 38, 148 => 37, 146 => 36, 140 => 32, 135 => 31, 133 => 30, 124 => 24, 119 => 21, 109 => 20, 97 => 17, 87 => 16, 75 => 13, 65 => 12, 54 => 7, 52 => 10, 39 => 7,);
}
public function getSourceContext()
{
return new Source("{#
Copyright (C) SPREAD WORKS Inc. All Rights Reserved.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{# 投稿リストの取得 #}
{% set post_list = TabaCMSPostList() %}
{% block javascript %}
{{ TabaCMSAsset('script.js','script')|raw }}
{% endblock javascript %}
{% block stylesheet %}
{{ TabaCMSAsset('style.css','style')|raw }}
{% endblock stylesheet %}
{% block main %}
<div class=\"container-lg\">
<div class=\"row\">
<div class=\"col-12\">
<div class=\"ec-pageHeader\"><h1>{{ type.getTypeName }}</h1></div>
</div>
</div>
<div class=\"row\">
<div class=\"col-md-9\">
<ul class=\"row tabacms_blog_list tabacms_height_match\">
{% set no_image = TabaCMSAsset('no_image.jpg') %}
{% for post in post_list %}
<li class=\"col-sm-6 col-md-4\">
<article>
<div class=\"tabacms_thumbnail_wrapper\">
<div class=\"tabacms_thumbnail\">
{% set thumb = no_image %}
{% if post.getThumbnail is not empty %}
{% set thumb = asset(post.getThumbnail,'save_image') %}
{% endif %}
{% if post.getContentDiv == constant('CONTENT_DIV_BODY',post) %}
<a href=\"{{ post.getURI }}\"><img src=\"{{ thumb }}\"></a>
{% elseif post.getContentDiv == constant('CONTENT_DIV_LINK',post) %}
<a href=\"{{ post.getLinkUrl }}\" {% if post.getLinkTarget %} target=\"{{ post.getLinkTarget }}\" {% endif %}><img src=\"{{ thumb }}\"></a>
{% elseif post.getContentDiv == constant('CONTENT_DIV_TITLE',post) %}
<img src=\"{{ thumb }}\">
{% endif %}
</div>
</div>
<div class=\"tabacms_detail\">
{% if post.getCategory is not empty %}
<label class=\"text-nowrap tabacms_category_{{ post.getType.getDataKey }}_{{ post.getCategory.getDataKey }}\" {{ post.getCategory.getTagAttributes|raw }}>{{ post.getCategory.getCategoryName }}</label>
{% endif %}
<time>
{{ post.getPublicDate|date('Y/m/d') }}
</time>
{% if post.getContentDiv == constant('CONTENT_DIV_BODY',post) %}
<h2 class=\"tabacms_ellipsis_2\">
<a href=\"{{ post.getURI }}\">{{ post.getTitle }}</a>
</h2>
<p class=\"tabacms_ellipsis_3\">
{{ post.getBody|striptags|raw }}
</p>
<a href=\"{{ post.getURI }}\" class=\"tabacms_readmore\">もっと読む</a>
{% elseif post.getContentDiv == constant('CONTENT_DIV_LINK',post) %}
<h2 class=\"tabacms_ellipsis_2\">
<a href=\"{{ post.getLinkUrl }}\" {% if post.getLinkTarget %} target=\"{{ post.getLinkTarget }}\" {% endif %}>{{ post.getTitle }}</a>
</h2>
{% elseif post.getContentDiv == constant('CONTENT_DIV_TITLE',post) %}
<h2 class=\"tabacms_ellipsis_2\">
{{ post.getTitle }}
</h2>
{% endif %}
</div>
</article>
</li>
{% endfor %}
</ul>
{% if post_list.totalItemCount > 0 %}
{% include \"pager.twig\" with {'pages':post_list.paginationData} %}
{% endif %}
</div>
<div class=\"col-md-3\">
{{ TabaCMSWidget('search')|raw }}
{{ TabaCMSWidget('category')|raw }}
{{ TabaCMSWidget('tag')|raw }}
</div>
</div>
</div>
{% endblock %}
", "@TabaCMS2/default/list_blog.twig", "/home/xs545372/itsukushi-store.com/public_html/stg.itsukushi-store.com/app/Plugin/TabaCMS2/Resource/template/default/list_blog.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 10, "for" => 31, "if" => 37, "include" => 79);
static $filters = array("raw" => 13, "escape" => 24, "date" => 54, "striptags" => 61);
static $functions = array("TabaCMSPostList" => 10, "TabaCMSAsset" => 13, "asset" => 38, "constant" => 40, "TabaCMSWidget" => 83);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if', 'include'],
['raw', 'escape', 'date', 'striptags'],
['TabaCMSPostList', 'TabaCMSAsset', 'asset', 'constant', 'TabaCMSWidget']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}