User warning: mkdir(): Permission Denied in Drupal\Component\PhpStorage\FileStorage->createDirectory() (line 123 of core/lib/Drupal/Component/PhpStorage/FileStorage.php).
Drupal\Component\PhpStorage\FileStorage->createDirectory('sites/default/files/php/twig', 511) (Line: 73)
Drupal\Component\PhpStorage\FileStorage->ensureDirectory('sites/default/files/php/twig') (Line: 66)
Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage->save('67470d855b0c7_whitespace-search-page.ht_SUVi-zLfHqa_v2NI2KB87A0Mh', '<?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;
/* modules/custom/whitespace_search/templates/whitespace-search-page.html.twig */
class __TwigTemplate_e1f710e16319b0746898d8577978ef8e extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "
";
// line 3
if ((($context["search_type"] ?? null) == "current")) {
// line 4
echo " ";
// line 9
echo " ";
} elseif ((($context["form"] ?? null) && (($context["search_type"] ?? null) == "default"))) {
// line 10
echo " ";
// line 13
echo "
";
// line 14
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(t("Search results"));
echo "
#block-sjf-page-title, nav.m-breadcrumb {
display: none; // Remove headline and breadcrumbs on search page (/search)
}
";
}
// line 22
echo "
";
// line 23
if ((($context["search_type"] ?? null) == "current")) {
// line 24
echo "
";
}
// line 27
echo "
";
// line 28
$context["from"] = ((($context["current_page"] ?? null) * 25) - 24);
// line 29
echo " ";
$context["to"] = (($context["from"] ?? null) + 24);
// line 30
echo " ";
$context["to"] = (((($context["to"] ?? null) > ($context["count"] ?? null))) ? (($context["count"] ?? null)) : (($context["to"] ?? null)));
// line 31
echo "
extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(($context["count"] ?? null), 32, $this->source), "html", null, true);
echo "\">
";
// line 33
if ((($context["count"] ?? null) > 0)) {
// line 34
echo " ";
if ((($context["search_type"] ?? null) == "default")) {
// line 35
echo " ";
if (($context["query"] ?? null)) {
// line 36
echo " ";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(t("Found"));
echo " ";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(($context["count"] ?? null), 36, $this->source), "html", null, true);
echo " ";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(t("search results for"));
echo " \"";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(($context["query"] ?? null), 36, $this->source), "html", null, true);
echo "\"
";
}
// line 38
echo "
";
// line 40
echo " ";
// line 42
echo "
";
}
// line 44
echo " ";
} else {
// line 45
echo " ";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(t("Sorry, no results found"));
echo "
";
}
// line 47
echo "
";
// line 52
if ((($context["search_type"] ?? null) == "current")) {
// line 53
echo "
";
// line 58
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["results"] ?? null));
$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 59
echo "
";
// line 61
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 61) <= 3)) {
echo " <a echo this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, true, 61), 61, $this->source), "html", null, true);
echo "\">
env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "hero", [], "any", false, false, true, 62), "image", [], "any", false, false, true, 62), "url", [], "any", false, false, true, 62)) {
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "hero", [], "any", false, false, true, 62), "image", [], "any", false, false, true, 62), "url", [], "any", false, false, true, 62), 62, $this->source), "html", null, true);
} else {
echo "/images/placeholder-latest.jpg";
}
echo ");\" title=\"";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "hero", [], "any", false, false, true, 62), "image", [], "any", false, false, true, 62), "alt", [], "any", false, false, true, 62), 62, $this->source), "html", null, true);
echo "\" alt=\"";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "hero", [], "any", false, false, true, 62), "image", [], "any", false, false, true, 62), "alt", [], "any", false, false, true, 62), 62, $this->source), "html", null, true);
echo "\">
</a>
";
}
// line 65
echo "
<a line echo this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, true, 66), 66, $this->source), "html", null, true);
echo "\">
";
// line 68
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "titel", [], "any", false, false, true, 68), 68, $this->source), "html", null, true);
echo "
</a>
<a line echo this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, true, 71), 71, $this->source), "html", null, true);
echo "\">
Publicerad ";
// line 73
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "created", [], "any", false, false, true, 73), 73, $this->source), "html", null, true);
echo "
</a>
<a line echo this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, true, 76), 76, $this->source), "html", null, true);
echo "\">
";
// line 86
if (twig_get_attribute($this->env, $this->source, $context["item"], "summary", [], "any", false, false, true, 86)) {
// line 87
echo " ";
$context["text"] = twig_get_attribute($this->env, $this->source, $context["item"], "summary", [], "any", false, false, true, 87);
// line 88
echo " ";
} else {
// line 89
echo " ";
$context["text"] = twig_get_attribute($this->env, $this->source, $context["item"], "ingress", [], "any", false, false, true, 89);
// line 90
echo " ";
}
// line 91
echo " ";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(twig_trim_filter(twig_striptags((((twig_length_filter($this->env, $this->sandbox->ensureToStringAllowed(($context["text"] ?? null), 91, $this->source)) > 250)) ? ((twig_slice($this->env, $this->sandbox->ensureToStringAllowed(($context["text"] ?? null), 91, $this->source), 0, 250) . "...")) : (($context["text"] ?? null)))), " "));
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 98
echo "
";
} else {
// line 106
echo "
";
// line 110
if ((($context["count"] ?? null) > 0)) {
// line 111
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["results"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 112
echo " ";
// line 113
$this->loadTemplate("molecules/search-result-teaser/search-result-teaser.twig", "modules/custom/whitespace_search/templates/whitespace-search-page.html.twig", 113)->display(twig_to_array(["item" => // line 114
$context["item"], "type" => // line 115
($context["search_type"] ?? null)]));
// line 118
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 119
echo " ";
}
// line 120
echo "
Filtrera resultat
";
// line 125
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar("Filtrera resultat");
echo "
";
// line 126
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->extensions['Drupal\whitespace_twig\TwigExtension']->icon("chevron-down", ["class" => "a-icon--black-fill"]), "html", null, true);
echo "
extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["facet"] ?? null), "label", [], "any", false, false, true, 128), 128, $this->source), "html", null, true);
echo "\">
<ul>
<li>
<a line echo this->extensions['Drupal\Core\Template\TwigExtension']->renderVar((((twig_get_attribute($this->env, $this->source, ($context["facets"] ?? null), 0, [], "any", false, false, true, 131) && ((($__internal_compile_0 = twig_get_attribute($this->env, $this->source, ($context["facets"] ?? null), 0, [], "any", false, false, true, 131)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0["#filter_url"] ?? null) : null) == ""))) ? ("m-facet__tag--active") : ("")));
echo "\" href=\"";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, twig_replace_filter($this->sandbox->ensureToStringAllowed(($context["base_url"] ?? null), 131, $this->source), ["?" => ""]), "html", null, true);
echo "\">
Alla kategorier
</a>
</li>
";
// line 135
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((($__internal_compile_1 = twig_get_attribute($this->env, $this->source, ($context["facets"] ?? null), 0, [], "any", false, false, true, 135)) && is_array($__internal_compile_1) || $__internal_compile_1 instanceof ArrayAccess ? ($__internal_compile_1["#facets"] ?? null) : null));
foreach ($context['_seq'] as $context["_key"] => $context["facet"]) {
// line 136
echo " <li>
";
// line 137
$context["filter_url"] = ((($context["filter_url"] ?? null)) ? (($context["filter_url"] ?? null)) : ((("&" . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["facet"], "name", [], "any", false, false, true, 137), 137, $this->source)) . "=")));
// line 138
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["facet"], "active", [], "any", false, false, true, 138)) {
// line 139
echo " ";
$context["active_query"] = twig_replace_filter($this->sandbox->ensureToStringAllowed(($context["filter_url"] ?? null), 139, $this->source), [twig_get_attribute($this->env, $this->source, $context["facet"], "value", [], "any", false, false, true, 139) => ""]);
// line 140
echo " ";
} else {
// line 141
echo " ";
$context["active_query"] = (($this->sandbox->ensureToStringAllowed(($context["filter_url"] ?? null), 141, $this->source) . ",") . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["facet"], "value", [], "any", false, false, true, 141), 141, $this->source));
// line 142
echo " ";
}
// line 143
echo " ";
$context["active_query"] = twig_replace_filter($this->sandbox->ensureToStringAllowed(($context["active_query"] ?? null), 143, $this->source), [",," => ","]);
// line 144
echo " ";
$context["active_query"] = twig_replace_filter($this->sandbox->ensureToStringAllowed(($context["active_query"] ?? null), 144, $this->source), ["=," => "="]);
// line 145
echo " ";
$context["active_query"] = twig_trim_filter($this->sandbox->ensureToStringAllowed(($context["active_query"] ?? null), 145, $this->source), ",");
// line 146
echo " ";
$context["group_test"] = twig_split_filter($this->env, $this->sandbox->ensureToStringAllowed(($context["active_query"] ?? null), 146, $this->source), "=");
// line 147
echo " ";
if ((($__internal_compile_2 = ($context["group_test"] ?? null)) && is_array($__internal_compile_2) || $__internal_compile_2 instanceof ArrayAccess ? ($__internal_compile_2[1] ?? null) : null)) {
// line 148
echo " ";
$context["url"] = (($this->sandbox->ensureToStringAllowed(($context["base_url"] ?? null), 148, $this->source) . "page=1") . $this->sandbox->ensureToStringAllowed(($context["active_query"] ?? null), 148, $this->source));
// line 149
echo " ";
} else {
// line 150
echo " ";
$context["url"] = twig_replace_filter($this->sandbox->ensureToStringAllowed(($context["base_url"] ?? null), 150, $this->source), ["?" => ""]);
// line 151
echo " ";
}
// line 152
echo " <a echo this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(((twig_get_attribute($this->env, $this->source, $context["facet"], "active", [], "any", false, false, true, 152)) ? ("m-facet__tag--active") : ("")));
echo "\" href=\"";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(($context["url"] ?? null), 152, $this->source), "html", null, true);
echo "\">
";
// line 153
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["facet"], "value", [], "any", false, false, true, 153), 153, $this->source), "html", null, true);
echo "
</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['facet'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 157
echo " </ul>
";
}
// line 165
$this->loadTemplate("molecules/navigation/pagination/pagination.twig", "modules/custom/whitespace_search/templates/whitespace-search-page.html.twig", 165)->display(twig_to_array(["base_url" => // line 166
($context["base_url"] ?? null), "pages" => // line 167
($context["pages"] ?? null), "current_page" => // line 168
($context["current_page"] ?? null), "active_query" => ((( // line 169
($context["from_url"] ?? null) . ($context["to_url"] ?? null)) . ($context["filter_url"] ?? null)) . ($context["sorting_url"] ?? null))]));
// line 172
echo "
";
$this->env->getExtension('\Drupal\Core\Template\TwigExtension')
->checkDeprecations($context, ["search_type", "form", "current_page", "count", "query", "results", "loop", "facet", "facets", "base_url", "pages", "from_url", "to_url", "sorting_url"]); }
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "modules/custom/whitespace_search/templates/whitespace-search-page.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 417 => 172, 415 => 169, 414 => 168, 413 => 167, 412 => 166, 411 => 165, 402 => 157, 392 => 153, 385 => 152, 382 => 151, 379 => 150, 376 => 149, 373 => 148, 370 => 147, 367 => 146, 364 => 145, 361 => 144, 358 => 143, 355 => 142, 352 => 141, 349 => 140, 346 => 139, 343 => 138, 341 => 137, 338 => 136, 334 => 135, 325 => 131, 319 => 128, 314 => 126, 310 => 125, 303 => 120, 300 => 119, 294 => 118, 292 => 115, 291 => 114, 290 => 113, 288 => 112, 283 => 111, 281 => 110, 275 => 106, 266 => 98, 244 => 91, 241 => 90, 238 => 89, 235 => 88, 232 => 87, 230 => 86, 217 => 76, 211 => 73, 206 => 71, 200 => 68, 195 => 66, 192 => 65, 178 => 62, 172 => 61, 168 => 59, 151 => 58, 144 => 53, 142 => 52, 136 => 47, 130 => 45, 127 => 44, 123 => 42, 121 => 40, 118 => 38, 106 => 36, 103 => 35, 100 => 34, 98 => 33, 90 => 32, 87 => 31, 84 => 30, 81 => 29, 79 => 28, 76 => 27, 71 => 24, 69 => 23, 66 => 22, 55 => 14, 52 => 13, 50 => 10, 47 => 9, 45 => 4, 43 => 3, 39 => 1,);
}
public function getSourceContext()
{
return new Source("", "modules/custom/whitespace_search/templates/whitespace-search-page.html.twig", "/srv/www/sjf.se/releases/2024-08-23T11:37:23.794Z/web/modules/custom/whitespace_search/templates/whitespace-search-page.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 3, "set" => 28, "for" => 58, "include" => 113);
static $filters = array("trans" => 14, "escape" => 32, "raw" => 91, "trim" => 91, "striptags" => 91, "length" => 91, "slice" => 91, "replace" => 131, "split" => 146);
static $functions = array("icon" => 126);
try {
$this->sandbox->checkSecurity(
['if', 'set', 'for', 'include'],
['trans', 'escape', 'raw', 'trim', 'striptags', 'length', 'slice', 'replace', 'split'],
['icon']
);
} 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;
}
}
}
') (Line: 112)
Drupal\Core\Template\TwigPhpStorageCache->write('67470d855b0c7_whitespace-search-page.ht_SUVi-zLfHqa_v2NI2KB87A0Mh', '<?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;
/* modules/custom/whitespace_search/templates/whitespace-search-page.html.twig */
class __TwigTemplate_e1f710e16319b0746898d8577978ef8e extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "
";
// line 3
if ((($context["search_type"] ?? null) == "current")) {
// line 4
echo " ";
// line 9
echo " ";
} elseif ((($context["form"] ?? null) && (($context["search_type"] ?? null) == "default"))) {
// line 10
echo " ";
// line 13
echo "
";
// line 14
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(t("Search results"));
echo "
#block-sjf-page-title, nav.m-breadcrumb {
display: none; // Remove headline and breadcrumbs on search page (/search)
}
";
}
// line 22
echo "
";
// line 23
if ((($context["search_type"] ?? null) == "current")) {
// line 24
echo "
";
}
// line 27
echo "
";
// line 28
$context["from"] = ((($context["current_page"] ?? null) * 25) - 24);
// line 29
echo " ";
$context["to"] = (($context["from"] ?? null) + 24);
// line 30
echo " ";
$context["to"] = (((($context["to"] ?? null) > ($context["count"] ?? null))) ? (($context["count"] ?? null)) : (($context["to"] ?? null)));
// line 31
echo "
extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(($context["count"] ?? null), 32, $this->source), "html", null, true);
echo "\">
";
// line 33
if ((($context["count"] ?? null) > 0)) {
// line 34
echo " ";
if ((($context["search_type"] ?? null) == "default")) {
// line 35
echo " ";
if (($context["query"] ?? null)) {
// line 36
echo " ";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(t("Found"));
echo " ";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(($context["count"] ?? null), 36, $this->source), "html", null, true);
echo " ";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(t("search results for"));
echo " \"";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(($context["query"] ?? null), 36, $this->source), "html", null, true);
echo "\"
";
}
// line 38
echo "
";
// line 40
echo " ";
// line 42
echo "
";
}
// line 44
echo " ";
} else {
// line 45
echo " ";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(t("Sorry, no results found"));
echo "
";
}
// line 47
echo "
";
// line 52
if ((($context["search_type"] ?? null) == "current")) {
// line 53
echo "
";
// line 58
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["results"] ?? null));
$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 59
echo "
";
// line 61
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 61) <= 3)) {
echo " <a echo this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, true, 61), 61, $this->source), "html", null, true);
echo "\">
env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "hero", [], "any", false, false, true, 62), "image", [], "any", false, false, true, 62), "url", [], "any", false, false, true, 62)) {
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "hero", [], "any", false, false, true, 62), "image", [], "any", false, false, true, 62), "url", [], "any", false, false, true, 62), 62, $this->source), "html", null, true);
} else {
echo "/images/placeholder-latest.jpg";
}
echo ");\" title=\"";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "hero", [], "any", false, false, true, 62), "image", [], "any", false, false, true, 62), "alt", [], "any", false, false, true, 62), 62, $this->source), "html", null, true);
echo "\" alt=\"";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "hero", [], "any", false, false, true, 62), "image", [], "any", false, false, true, 62), "alt", [], "any", false, false, true, 62), 62, $this->source), "html", null, true);
echo "\">
</a>
";
}
// line 65
echo "
<a line echo this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, true, 66), 66, $this->source), "html", null, true);
echo "\">
";
// line 68
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "titel", [], "any", false, false, true, 68), 68, $this->source), "html", null, true);
echo "
</a>
<a line echo this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, true, 71), 71, $this->source), "html", null, true);
echo "\">
Publicerad ";
// line 73
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "created", [], "any", false, false, true, 73), 73, $this->source), "html", null, true);
echo "
</a>
<a line echo this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, true, 76), 76, $this->source), "html", null, true);
echo "\">
";
// line 86
if (twig_get_attribute($this->env, $this->source, $context["item"], "summary", [], "any", false, false, true, 86)) {
// line 87
echo " ";
$context["text"] = twig_get_attribute($this->env, $this->source, $context["item"], "summary", [], "any", false, false, true, 87);
// line 88
echo " ";
} else {
// line 89
echo " ";
$context["text"] = twig_get_attribute($this->env, $this->source, $context["item"], "ingress", [], "any", false, false, true, 89);
// line 90
echo " ";
}
// line 91
echo " ";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(twig_trim_filter(twig_striptags((((twig_length_filter($this->env, $this->sandbox->ensureToStringAllowed(($context["text"] ?? null), 91, $this->source)) > 250)) ? ((twig_slice($this->env, $this->sandbox->ensureToStringAllowed(($context["text"] ?? null), 91, $this->source), 0, 250) . "...")) : (($context["text"] ?? null)))), " "));
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 98
echo "
";
} else {
// line 106
echo "
";
// line 110
if ((($context["count"] ?? null) > 0)) {
// line 111
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["results"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 112
echo " ";
// line 113
$this->loadTemplate("molecules/search-result-teaser/search-result-teaser.twig", "modules/custom/whitespace_search/templates/whitespace-search-page.html.twig", 113)->display(twig_to_array(["item" => // line 114
$context["item"], "type" => // line 115
($context["search_type"] ?? null)]));
// line 118
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 119
echo " ";
}
// line 120
echo "
Filtrera resultat
";
// line 125
echo $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar("Filtrera resultat");
echo "
";
// line 126
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->extensions['Drupal\whitespace_twig\TwigExtension']->icon("chevron-down", ["class" => "a-icon--black-fill"]), "html", null, true);
echo "
extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["facet"] ?? null), "label", [], "any", false, false, true, 128), 128, $this->source), "html", null, true);
echo "\">
<ul>
<li>
<a line echo this->extensions['Drupal\Core\Template\TwigExtension']->renderVar((((twig_get_attribute($this->env, $this->source, ($context["facets"] ?? null), 0, [], "any", false, false, true, 131) && ((($__internal_compile_0 = twig_get_attribute($this->env, $this->source, ($context["facets"] ?? null), 0, [], "any", false, false, true, 131)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0["#filter_url"] ?? null) : null) == ""))) ? ("m-facet__tag--active") : ("")));
echo "\" href=\"";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, twig_replace_filter($this->sandbox->ensureToStringAllowed(($context["base_url"] ?? null), 131, $this->source), ["?" => ""]), "html", null, true);
echo "\">
Alla kategorier
</a>
</li>
";
// line 135
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((($__internal_compile_1 = twig_get_attribute($this->env, $this->source, ($context["facets"] ?? null), 0, [], "any", false, false, true, 135)) && is_array($__internal_compile_1) || $__internal_compile_1 instanceof ArrayAccess ? ($__internal_compile_1["#facets"] ?? null) : null));
foreach ($context['_seq'] as $context["_key"] => $context["facet"]) {
// line 136
echo " <li>
";
// line 137
$context["filter_url"] = ((($context["filter_url"] ?? null)) ? (($context["filter_url"] ?? null)) : ((("&" . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["facet"], "name", [], "any", false, false, true, 137), 137, $this->source)) . "=")));
// line 138
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["facet"], "active", [], "any", false, false, true, 138)) {
// line 139
echo " ";
$context["active_query"] = twig_replace_filter($this->sandbox->ensureToStringAllowed(($context["filter_url"] ?? null), 139, $this->source), [twig_get_attribute($this->env, $this->source, $context["facet"], "value", [], "any", false, false, true, 139) => ""]);
// line 140
echo " ";
} else {
// line 141
echo " ";
$context["active_query"] = (($this->sandbox->ensureToStringAllowed(($context["filter_url"] ?? null), 141, $this->source) . ",") . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["facet"], "value", [], "any", false, false, true, 141), 141, $this->source));
// line 142
echo " ";
}
// line 143
echo " ";
$context["active_query"] = twig_replace_filter($this->sandbox->ensureToStringAllowed(($context["active_query"] ?? null), 143, $this->source), [",," => ","]);
// line 144
echo " ";
$context["active_query"] = twig_replace_filter($this->sandbox->ensureToStringAllowed(($context["active_query"] ?? null), 144, $this->source), ["=," => "="]);
// line 145
echo " ";
$context["active_query"] = twig_trim_filter($this->sandbox->ensureToStringAllowed(($context["active_query"] ?? null), 145, $this->source), ",");
// line 146
echo " ";
$context["group_test"] = twig_split_filter($this->env, $this->sandbox->ensureToStringAllowed(($context["active_query"] ?? null), 146, $this->source), "=");
// line 147
echo " ";
if ((($__internal_compile_2 = ($context["group_test"] ?? null)) && is_array($__internal_compile_2) || $__internal_compile_2 instanceof ArrayAccess ? ($__internal_compile_2[1] ?? null) : null)) {
// line 148
echo " ";
$context["url"] = (($this->sandbox->ensureToStringAllowed(($context["base_url"] ?? null), 148, $this->source) . "page=1") . $this->sandbox->ensureToStringAllowed(($context["active_query"] ?? null), 148, $this->source));
// line 149
echo " ";
} else {
// line 150
echo " ";
$context["url"] = twig_replace_filter($this->sandbox->ensureToStringAllowed(($context["base_url"] ?? null), 150, $this->source), ["?" => ""]);
// line 151
echo " ";
}
// line 152
echo " <a echo this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(((twig_get_attribute($this->env, $this->source, $context["facet"], "active", [], "any", false, false, true, 152)) ? ("m-facet__tag--active") : ("")));
echo "\" href=\"";
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(($context["url"] ?? null), 152, $this->source), "html", null, true);
echo "\">
";
// line 153
echo $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["facet"], "value", [], "any", false, false, true, 153), 153, $this->source), "html", null, true);
echo "
</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['facet'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 157
echo " </ul>
";
}
// line 165
$this->loadTemplate("molecules/navigation/pagination/pagination.twig", "modules/custom/whitespace_search/templates/whitespace-search-page.html.twig", 165)->display(twig_to_array(["base_url" => // line 166
($context["base_url"] ?? null), "pages" => // line 167
($context["pages"] ?? null), "current_page" => // line 168
($context["current_page"] ?? null), "active_query" => ((( // line 169
($context["from_url"] ?? null) . ($context["to_url"] ?? null)) . ($context["filter_url"] ?? null)) . ($context["sorting_url"] ?? null))]));
// line 172
echo "
";
$this->env->getExtension('\Drupal\Core\Template\TwigExtension')
->checkDeprecations($context, ["search_type", "form", "current_page", "count", "query", "results", "loop", "facet", "facets", "base_url", "pages", "from_url", "to_url", "sorting_url"]); }
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "modules/custom/whitespace_search/templates/whitespace-search-page.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 417 => 172, 415 => 169, 414 => 168, 413 => 167, 412 => 166, 411 => 165, 402 => 157, 392 => 153, 385 => 152, 382 => 151, 379 => 150, 376 => 149, 373 => 148, 370 => 147, 367 => 146, 364 => 145, 361 => 144, 358 => 143, 355 => 142, 352 => 141, 349 => 140, 346 => 139, 343 => 138, 341 => 137, 338 => 136, 334 => 135, 325 => 131, 319 => 128, 314 => 126, 310 => 125, 303 => 120, 300 => 119, 294 => 118, 292 => 115, 291 => 114, 290 => 113, 288 => 112, 283 => 111, 281 => 110, 275 => 106, 266 => 98, 244 => 91, 241 => 90, 238 => 89, 235 => 88, 232 => 87, 230 => 86, 217 => 76, 211 => 73, 206 => 71, 200 => 68, 195 => 66, 192 => 65, 178 => 62, 172 => 61, 168 => 59, 151 => 58, 144 => 53, 142 => 52, 136 => 47, 130 => 45, 127 => 44, 123 => 42, 121 => 40, 118 => 38, 106 => 36, 103 => 35, 100 => 34, 98 => 33, 90 => 32, 87 => 31, 84 => 30, 81 => 29, 79 => 28, 76 => 27, 71 => 24, 69 => 23, 66 => 22, 55 => 14, 52 => 13, 50 => 10, 47 => 9, 45 => 4, 43 => 3, 39 => 1,);
}
public function getSourceContext()
{
return new Source("", "modules/custom/whitespace_search/templates/whitespace-search-page.html.twig", "/srv/www/sjf.se/releases/2024-08-23T11:37:23.794Z/web/modules/custom/whitespace_search/templates/whitespace-search-page.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 3, "set" => 28, "for" => 58, "include" => 113);
static $filters = array("trans" => 14, "escape" => 32, "raw" => 91, "trim" => 91, "striptags" => 91, "length" => 91, "slice" => 91, "replace" => 131, "split" => 146);
static $functions = array("icon" => 126);
try {
$this->sandbox->checkSecurity(
['if', 'set', 'for', 'include'],
['trans', 'escape', 'raw', 'trim', 'striptags', 'length', 'slice', 'replace', 'split'],
['icon']
);
} 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;
}
}
}
') (Line: 351)
Twig\Environment->loadTemplate('__TwigTemplate_e1f710e16319b0746898d8577978ef8e', 'modules/custom/whitespace_search/templates/whitespace-search-page.html.twig') (Line: 312)
Twig\Environment->load('modules/custom/whitespace_search/templates/whitespace-search-page.html.twig') (Line: 39)
twig_render_template('modules/custom/whitespace_search/templates/whitespace-search-page.html.twig', Array) (Line: 348)
Drupal\Core\Theme\ThemeManager->render('whitespace_search_page', Array) (Line: 480)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 240)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 239)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)