<?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;
/* @App/ObjectViews/search-results.html.twig */
class __TwigTemplate_c01c3269e6a8d2061e86b65ae678c8ab extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 1
return "@FoxHabbitBasis/Layout/layout.html.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", "@App/ObjectViews/search-results.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/ObjectViews/search-results.html.twig"));
$this->parent = $this->loadTemplate("@FoxHabbitBasis/Layout/layout.html.twig", "@App/ObjectViews/search-results.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_content($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", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
echo " <div class=\"search-results-container\">
<header class=\"header-small bg-white\">
<div class=\"container-fluid\">
<div class=\"col-10 offset-1\">
";
// line 8
if (((array_key_exists("searchQuery", $context)) ? (_twig_default_filter((isset($context["searchQuery"]) || array_key_exists("searchQuery", $context) ? $context["searchQuery"] : (function () { throw new RuntimeError('Variable "searchQuery" does not exist.', 8, $this->source); })()), null)) : (null))) {
// line 9
echo " <h1 class=\"display-3 text-pre-line\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("fulltext-seach.header.search-result"), "html", null, true);
echo "</h1>
<div class=\"lead\">";
// line 10
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("fulltext-seach.header.for"), "html", null, true);
echo " \"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["searchQuery"]) || array_key_exists("searchQuery", $context) ? $context["searchQuery"] : (function () { throw new RuntimeError('Variable "searchQuery" does not exist.', 10, $this->source); })()), 10, $this->source), "html", null, true);
echo "\"</div>
";
} else {
// line 12
echo " <h1 class=\"display-3 text-pre-line\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("fulltext-seach.header.search-page"), "html", null, true);
echo "</h1>
";
}
// line 14
echo " </div>
</div>
</header>
<div class=\"search-full-text-container col-10 offset-1 col-lg-6 offset-lg-3\">
";
// line 18
if (((array_key_exists("error", $context)) ? (_twig_default_filter((isset($context["error"]) || array_key_exists("error", $context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.', 18, $this->source); })()), null)) : (null))) {
// line 19
echo " <div class=\"alert alert-danger\">
";
// line 20
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("fulltext-seach.search-internal-error"), "html", null, true);
echo "
</div>
";
}
// line 23
echo " <form id=\"search\" method=\"get\" action=\"";
((twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 23, $this->source); })()), "getProperty", ["enableSearch"], "method", false, false, true, 23)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 23, $this->source); })()), "getProperty", ["enableSearch"], "method", false, false, true, 23), "getFullPath", [], "method", false, false, true, 23), "html", null, true))) : (print ("")));
echo "\">
<div class=\"second-search-field form-group\">
<label for=\"search-field\">";
// line 25
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("fulltext-seach.search-form.search-field.label"), "html", null, true);
echo "</label>
<input type=\"text\" name=\"q\" id=\"autocomplete\" value=\"";
// line 26
echo twig_escape_filter($this->env, ((array_key_exists("searchQuery", $context)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed((isset($context["searchQuery"]) || array_key_exists("searchQuery", $context) ? $context["searchQuery"] : (function () { throw new RuntimeError('Variable "searchQuery" does not exist.', 26, $this->source); })()), 26, $this->source), null)) : (null)), "html", null, true);
echo "\" class=\"search-input form-control full-text-search-autocomplete\">
<div class=\"search-suggestions-secondary d-none\">
<div class=\"suggestions\">
<h5>";
// line 29
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "search_suggestions_title", ["placeholder" => "Enter title for Search Suggestions"]);
echo "</h5>
<ul class=\"second-search-suggestions__list\">
";
// line 31
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 31, $this->source); })())) {
echo "<li><a href=\"#\">Search suggestions will appear here</a></li>";
}
// line 32
echo " </ul>
</div>
</div>
</div>
<input type=\"submit\" class=\"btn btn-secondary btn-search\" name=\"submit\" value=";
// line 36
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("fulltext-seach.search-form.submit"), "html", null, true);
echo ">
</form>
</div>
";
// line 41
echo " <script type=\"text/javascript\">
document.addEventListener(\"DOMContentLoaded\", function () {
if (document.querySelector(\"#iframe-wrapper-boost\")) return;
const params = new URLSearchParams(window.location.search);
const searchTerm = params.get(\"q\");
if (!searchTerm) return;
// --- AI Overview Header ---
const header = document.createElement(\"div\");
header.style.display = \"flex\";
header.style.alignItems = \"center\";
header.style.gap = \"8px\";
header.style.fontSize = \"16px\";
header.style.fontWeight = \"500\";
header.style.color = \"#444\";
header.style.margin = \"40px auto 8px auto\";
header.style.maxWidth = \"900px\";
header.style.paddingLeft = \"4px\";
const sparkle = document.createElement(\"span\");
sparkle.innerHTML = \"✦\";
sparkle.style.color = \"#8ab4f8\";
const label = document.createElement(\"span\");
label.textContent = \"AI Overview\";
header.appendChild(sparkle);
header.appendChild(label);
// --- Iframe Wrapper ---
const wrapper = document.createElement(\"div\");
wrapper.id = \"iframe-wrapper-boost\";
wrapper.style.position = \"relative\";
wrapper.style.overflow = \"hidden\";
wrapper.style.maxHeight = \"280px\"; // smaller initial height
wrapper.style.border = \"1px solid #ddd\";
wrapper.style.borderRadius = \"12px\";
wrapper.style.boxShadow = \"0 4px 12px rgba(0,0,0,0.08)\";
wrapper.style.transition = \"max-height 0.4s ease\";
wrapper.style.margin = \"0 auto 16px auto\";
wrapper.style.width = \"100%\";
wrapper.style.maxWidth = \"900px\";
wrapper.style.backgroundColor = \"#fff\";
const iframe = document.createElement(\"iframe\");
iframe.src = `https://smart-search-prototype.vercel.app/?q=\${encodeURIComponent(searchTerm)}`;
iframe.id = \"my-boost-iframe\";
iframe.width = \"100%\";
iframe.style.height = \"1000px\";
iframe.style.border = \"none\";
iframe.style.borderRadius = \"12px\";
const gradient = document.createElement(\"div\");
gradient.style.position = \"absolute\";
gradient.style.bottom = \"0\";
gradient.style.left = \"0\";
gradient.style.width = \"100%\";
gradient.style.height = \"60px\";
gradient.style.background = \"linear-gradient(to bottom, rgba(255,255,255,0), #fff)\";
gradient.style.pointerEvents = \"none\";
const button = document.createElement(\"button\");
button.textContent = \"Show more\";
button.style.display = \"block\";
button.style.margin = \"0 auto 40px auto\";
button.style.background = \"#f2f2f2\";
button.style.border = \"1px solid #ccc\";
button.style.borderRadius = \"9999px\";
button.style.padding = \"10px 24px\";
button.style.fontSize = \"15px\";
button.style.color = \"#333\";
button.style.cursor = \"pointer\";
button.style.transition = \"all 0.2s ease\";
let expanded = false;
button.addEventListener(\"click\", function () {
expanded = !expanded;
wrapper.style.maxHeight = expanded ? \"1000px\" : \"280px\";
gradient.style.display = expanded ? \"none\" : \"block\";
button.textContent = expanded ? \"Show less\" : \"Show more\";
});
wrapper.appendChild(iframe);
wrapper.appendChild(gradient);
const resultsContainer = document.querySelector(\"#results\");
if (resultsContainer && resultsContainer.parentNode) {
resultsContainer.parentNode.insertBefore(header, resultsContainer);
resultsContainer.parentNode.insertBefore(wrapper, resultsContainer);
resultsContainer.parentNode.insertBefore(button, resultsContainer);
}
});
</script>
<section class=\"section\">
";
// line 138
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "area", "breadcrumb", ["type" => "basisbundle-breadcrumb"]);
echo "
<div id=\"results\"></div>
</section>
";
// line 141
if (((array_key_exists("searchHasResults", $context)) ? (_twig_default_filter((isset($context["searchHasResults"]) || array_key_exists("searchHasResults", $context) ? $context["searchHasResults"] : (function () { throw new RuntimeError('Variable "searchHasResults" does not exist.', 141, $this->source); })()), null)) : (null))) {
// line 142
echo " <div class=\"col-11 offset-1\">
<div class=\"info\">
";
// line 144
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("fulltext-seach.search-list.result.results-from"), "html", null, true);
echo " <span> ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["searchCurrentPageResultStart"]) || array_key_exists("searchCurrentPageResultStart", $context) ? $context["searchCurrentPageResultStart"] : (function () { throw new RuntimeError('Variable "searchCurrentPageResultStart" does not exist.', 144, $this->source); })()), 144, $this->source), "html", null, true);
echo " - ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["searchCurrentPageResultEnd"]) || array_key_exists("searchCurrentPageResultEnd", $context) ? $context["searchCurrentPageResultEnd"] : (function () { throw new RuntimeError('Variable "searchCurrentPageResultEnd" does not exist.', 144, $this->source); })()), 144, $this->source), "html", null, true);
echo " </span> ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("fulltext-seach.search-list.result.of"), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["searchTotalHits"]) || array_key_exists("searchTotalHits", $context) ? $context["searchTotalHits"] : (function () { throw new RuntimeError('Variable "searchTotalHits" does not exist.', 144, $this->source); })()), 144, $this->source), "html", null, true);
echo "
</div>
</div>
";
}
// line 148
echo " <div class=\"section p-0 container-fluid\">
<div class=\"search-list\">
";
// line 150
if (((array_key_exists("searchHasResults", $context)) ? (_twig_default_filter((isset($context["searchHasResults"]) || array_key_exists("searchHasResults", $context) ? $context["searchHasResults"] : (function () { throw new RuntimeError('Variable "searchHasResults" does not exist.', 150, $this->source); })()), null)) : (null))) {
// line 151
echo " <ul class=\"search-results list-unstyled\">
";
// line 152
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["searchResults"]) || array_key_exists("searchResults", $context) ? $context["searchResults"] : (function () { throw new RuntimeError('Variable "searchResults" does not exist.', 152, $this->source); })()));
foreach ($context['_seq'] as $context["i"] => $context["searchResult"]) {
// line 153
echo " <li class=\"search-result\">
<div class=\"search-result-content col-12 col-sm-10 offset-sm-1 col-lg-6 offset-lg-3\">
<a href=\"";
// line 155
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["searchResult"], "url", [], "any", false, false, true, 155), 155, $this->source), "html", null, true);
echo "\" class=\"search-result-title\">
";
// line 156
if (((twig_get_attribute($this->env, $this->source, $context["searchResult"], "title", [], "any", true, true, true, 156)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["searchResult"], "title", [], "any", false, false, true, 156), null)) : (null))) {
// line 157
echo " ";
echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["searchResult"], "title", [], "any", false, false, true, 157), 157, $this->source);
echo "
";
}
// line 159
echo " ";
if (((twig_get_attribute($this->env, $this->source, $context["searchResult"], "h1", [], "any", true, true, true, 159)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["searchResult"], "h1", [], "any", false, false, true, 159), null)) : (null))) {
// line 160
echo " ";
echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["searchResult"], "h1", [], "any", false, false, true, 160), 160, $this->source);
echo "
";
}
// line 162
echo " </a>
<p class=\"search-result-summary\">";
// line 163
echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["searchResult"], "summary", [], "any", false, false, true, 163), 163, $this->source);
echo "</p>
<a href=\"";
// line 164
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["searchResult"], "url", [], "any", false, false, true, 164), 164, $this->source), "html", null, true);
echo "\" class=\"read-more\"><i class=\"lorch-icon lorch-icon-next\"></i>
";
// line 165
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("fulltext-seach.search-list.result.read-more"), "html", null, true);
echo "
</a>
</div>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['i'], $context['searchResult'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 170
echo " </ul>
";
// line 172
$context["paginationVariables"] = $this->extensions['AppBundle\Twig\Extension\FullTextSearchPaginationExtension']->getPagination($this->env, $context);
// line 173
echo " ";
if (((isset($context["searchAllPages"]) || array_key_exists("searchAllPages", $context) ? $context["searchAllPages"] : (function () { throw new RuntimeError('Variable "searchAllPages" does not exist.', 173, $this->source); })()) > 1)) {
// line 174
echo " <div class=\"paginator\">
";
// line 175
if ((twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 175, $this->source); })()), "currentSearchPage", [], "any", false, false, true, 175) > 1)) {
// line 176
echo " <a class=\"previous icon-arrow-left\"
href=\"";
// line 177
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 177, $this->source); })()), "searchUrl", [], "any", false, false, true, 177), 177, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 177, $this->source); })()), "searchUrlData", [], "any", false, false, true, 177), 177, $this->source), "html", null, true);
echo "&page=";
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 177, $this->source); })()), "currentSearchPage", [], "any", false, false, true, 177) - 1), "html", null, true);
echo "\"></a>
";
} else {
// line 179
echo " <a class=\"previous icon-arrow-left icon-arrow-left-disabled\"
href=\"";
// line 180
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 180, $this->source); })()), "searchUrl", [], "any", false, false, true, 180), 180, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 180, $this->source); })()), "searchUrlData", [], "any", false, false, true, 180), 180, $this->source), "html", null, true);
echo "&page=";
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 180, $this->source); })()), "currentSearchPage", [], "any", false, false, true, 180) - 1), "html", null, true);
echo "\"></a>
";
}
// line 182
echo "
";
// line 183
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 183, $this->source); })()), "searchPageStart", [], "any", false, false, true, 183), twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 183, $this->source); })()), "searchPageEnd", [], "any", false, false, true, 183)));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 184
echo " ";
if (($context["i"] == twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 184, $this->source); })()), "searchPageEnd", [], "any", false, false, true, 184))) {
// line 185
echo " <a ";
echo (((twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 185, $this->source); })()), "currentSearchPage", [], "any", false, false, true, 185) == $context["i"])) ? ("class=\"active\"") : (""));
echo "
href=\"";
// line 186
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 186, $this->source); })()), "searchUrl", [], "any", false, false, true, 186), 186, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 186, $this->source); })()), "searchUrlData", [], "any", false, false, true, 186), 186, $this->source), "html", null, true);
echo "&page=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["i"], 186, $this->source), "html", null, true);
echo "#results\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["i"], 186, $this->source), "html", null, true);
echo "</a>
";
} else {
// line 188
echo " <a ";
echo (((twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 188, $this->source); })()), "currentSearchPage", [], "any", false, false, true, 188) == $context["i"])) ? ("class=\"active\"") : (""));
echo "
href=\"";
// line 189
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 189, $this->source); })()), "searchUrl", [], "any", false, false, true, 189), 189, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 189, $this->source); })()), "searchUrlData", [], "any", false, false, true, 189), 189, $this->source), "html", null, true);
echo "&page=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["i"], 189, $this->source), "html", null, true);
echo "#results\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["i"], 189, $this->source), "html", null, true);
echo "</a>
<span class=\"pagination-line\">|</span>
";
}
// line 192
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 193
echo "
";
// line 194
if ((twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 194, $this->source); })()), "searchPageEnd", [], "any", false, false, true, 194) > twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 194, $this->source); })()), "currentSearchPage", [], "any", false, false, true, 194))) {
// line 195
echo " <a class=\"next icon-arrow-right\"
href=\"";
// line 196
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 196, $this->source); })()), "searchUrl", [], "any", false, false, true, 196), 196, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 196, $this->source); })()), "searchUrlData", [], "any", false, false, true, 196), 196, $this->source), "html", null, true);
echo "&page=";
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 196, $this->source); })()), "currentSearchPage", [], "any", false, false, true, 196) + 1), "html", null, true);
echo "#results\"></a>
";
} else {
// line 198
echo " <a class=\"next icon-arrow-right icon-arrow-right-disabled\"
href=\"";
// line 199
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 199, $this->source); })()), "searchUrl", [], "any", false, false, true, 199), 199, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 199, $this->source); })()), "searchUrlData", [], "any", false, false, true, 199), 199, $this->source), "html", null, true);
echo "&page=";
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, (isset($context["paginationVariables"]) || array_key_exists("paginationVariables", $context) ? $context["paginationVariables"] : (function () { throw new RuntimeError('Variable "paginationVariables" does not exist.', 199, $this->source); })()), "currentSearchPage", [], "any", false, false, true, 199) + 1), "html", null, true);
echo "#results\"></a>
";
}
// line 201
echo " </div>
";
}
// line 203
echo " ";
} else {
// line 204
echo " ";
if ( !twig_test_empty(((array_key_exists("searchQuery", $context)) ? (_twig_default_filter((isset($context["searchQuery"]) || array_key_exists("searchQuery", $context) ? $context["searchQuery"] : (function () { throw new RuntimeError('Variable "searchQuery" does not exist.', 204, $this->source); })()), null)) : (null)))) {
// line 205
echo " <div class=\"section pt-0 no-results col-10 offset-1 col-lg-6 offset-lg-3\">
<h5>";
// line 206
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("fulltext-seach.search-list.result.none"), "html", null, true);
echo "</h5>
";
// line 207
$this->loadTemplate("@LuceneSearch/List/Partial/suggestions.html.twig", "@App/ObjectViews/search-results.html.twig", 207)->display($context);
// line 208
echo " </div>
";
}
// line 210
echo " ";
}
// line 211
echo " </div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@App/ObjectViews/search-results.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 473 => 211, 470 => 210, 466 => 208, 464 => 207, 460 => 206, 457 => 205, 454 => 204, 451 => 203, 447 => 201, 439 => 199, 436 => 198, 428 => 196, 425 => 195, 423 => 194, 420 => 193, 414 => 192, 403 => 189, 398 => 188, 388 => 186, 383 => 185, 380 => 184, 376 => 183, 373 => 182, 365 => 180, 362 => 179, 354 => 177, 351 => 176, 349 => 175, 346 => 174, 343 => 173, 341 => 172, 337 => 170, 326 => 165, 322 => 164, 318 => 163, 315 => 162, 309 => 160, 306 => 159, 300 => 157, 298 => 156, 294 => 155, 290 => 153, 286 => 152, 283 => 151, 281 => 150, 277 => 148, 262 => 144, 258 => 142, 256 => 141, 250 => 138, 151 => 41, 144 => 36, 138 => 32, 134 => 31, 129 => 29, 123 => 26, 119 => 25, 113 => 23, 107 => 20, 104 => 19, 102 => 18, 96 => 14, 90 => 12, 83 => 10, 78 => 9, 76 => 8, 70 => 4, 60 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends '@FoxHabbitBasis/Layout/layout.html.twig' %}
{% block content %}
<div class=\"search-results-container\">
<header class=\"header-small bg-white\">
<div class=\"container-fluid\">
<div class=\"col-10 offset-1\">
{% if searchQuery|default(null) %}
<h1 class=\"display-3 text-pre-line\">{{ 'fulltext-seach.header.search-result' | trans }}</h1>
<div class=\"lead\">{{ 'fulltext-seach.header.for' | trans }} \"{{ searchQuery }}\"</div>
{% else %}
<h1 class=\"display-3 text-pre-line\">{{ 'fulltext-seach.header.search-page' | trans }}</h1>
{% endif %}
</div>
</div>
</header>
<div class=\"search-full-text-container col-10 offset-1 col-lg-6 offset-lg-3\">
{% if error|default(null)%}
<div class=\"alert alert-danger\">
{{ 'fulltext-seach.search-internal-error' | trans }}
</div>
{% endif %}
<form id=\"search\" method=\"get\" action=\"{{ document.getProperty('enableSearch') ? document.getProperty('enableSearch').getFullPath() : '' }}\">
<div class=\"second-search-field form-group\">
<label for=\"search-field\">{{ 'fulltext-seach.search-form.search-field.label' | trans }}</label>
<input type=\"text\" name=\"q\" id=\"autocomplete\" value=\"{{ searchQuery|default(null) }}\" class=\"search-input form-control full-text-search-autocomplete\">
<div class=\"search-suggestions-secondary d-none\">
<div class=\"suggestions\">
<h5>{{ pimcore_input('search_suggestions_title', {\"placeholder\": \"Enter title for Search Suggestions\"}) }}</h5>
<ul class=\"second-search-suggestions__list\">
{% if editmode %}<li><a href=\"#\">Search suggestions will appear here</a></li>{% endif %}
</ul>
</div>
</div>
</div>
<input type=\"submit\" class=\"btn btn-secondary btn-search\" name=\"submit\" value={{ 'fulltext-seach.search-form.submit' | trans }}>
</form>
</div>
{# <div id=\"iframe-wrapper-boost\"></div> #}
<script type=\"text/javascript\">
document.addEventListener(\"DOMContentLoaded\", function () {
if (document.querySelector(\"#iframe-wrapper-boost\")) return;
const params = new URLSearchParams(window.location.search);
const searchTerm = params.get(\"q\");
if (!searchTerm) return;
// --- AI Overview Header ---
const header = document.createElement(\"div\");
header.style.display = \"flex\";
header.style.alignItems = \"center\";
header.style.gap = \"8px\";
header.style.fontSize = \"16px\";
header.style.fontWeight = \"500\";
header.style.color = \"#444\";
header.style.margin = \"40px auto 8px auto\";
header.style.maxWidth = \"900px\";
header.style.paddingLeft = \"4px\";
const sparkle = document.createElement(\"span\");
sparkle.innerHTML = \"✦\";
sparkle.style.color = \"#8ab4f8\";
const label = document.createElement(\"span\");
label.textContent = \"AI Overview\";
header.appendChild(sparkle);
header.appendChild(label);
// --- Iframe Wrapper ---
const wrapper = document.createElement(\"div\");
wrapper.id = \"iframe-wrapper-boost\";
wrapper.style.position = \"relative\";
wrapper.style.overflow = \"hidden\";
wrapper.style.maxHeight = \"280px\"; // smaller initial height
wrapper.style.border = \"1px solid #ddd\";
wrapper.style.borderRadius = \"12px\";
wrapper.style.boxShadow = \"0 4px 12px rgba(0,0,0,0.08)\";
wrapper.style.transition = \"max-height 0.4s ease\";
wrapper.style.margin = \"0 auto 16px auto\";
wrapper.style.width = \"100%\";
wrapper.style.maxWidth = \"900px\";
wrapper.style.backgroundColor = \"#fff\";
const iframe = document.createElement(\"iframe\");
iframe.src = `https://smart-search-prototype.vercel.app/?q=\${encodeURIComponent(searchTerm)}`;
iframe.id = \"my-boost-iframe\";
iframe.width = \"100%\";
iframe.style.height = \"1000px\";
iframe.style.border = \"none\";
iframe.style.borderRadius = \"12px\";
const gradient = document.createElement(\"div\");
gradient.style.position = \"absolute\";
gradient.style.bottom = \"0\";
gradient.style.left = \"0\";
gradient.style.width = \"100%\";
gradient.style.height = \"60px\";
gradient.style.background = \"linear-gradient(to bottom, rgba(255,255,255,0), #fff)\";
gradient.style.pointerEvents = \"none\";
const button = document.createElement(\"button\");
button.textContent = \"Show more\";
button.style.display = \"block\";
button.style.margin = \"0 auto 40px auto\";
button.style.background = \"#f2f2f2\";
button.style.border = \"1px solid #ccc\";
button.style.borderRadius = \"9999px\";
button.style.padding = \"10px 24px\";
button.style.fontSize = \"15px\";
button.style.color = \"#333\";
button.style.cursor = \"pointer\";
button.style.transition = \"all 0.2s ease\";
let expanded = false;
button.addEventListener(\"click\", function () {
expanded = !expanded;
wrapper.style.maxHeight = expanded ? \"1000px\" : \"280px\";
gradient.style.display = expanded ? \"none\" : \"block\";
button.textContent = expanded ? \"Show less\" : \"Show more\";
});
wrapper.appendChild(iframe);
wrapper.appendChild(gradient);
const resultsContainer = document.querySelector(\"#results\");
if (resultsContainer && resultsContainer.parentNode) {
resultsContainer.parentNode.insertBefore(header, resultsContainer);
resultsContainer.parentNode.insertBefore(wrapper, resultsContainer);
resultsContainer.parentNode.insertBefore(button, resultsContainer);
}
});
</script>
<section class=\"section\">
{{ pimcore_area('breadcrumb', {type:'basisbundle-breadcrumb'}) }}
<div id=\"results\"></div>
</section>
{% if searchHasResults|default(null) %}
<div class=\"col-11 offset-1\">
<div class=\"info\">
{{ 'fulltext-seach.search-list.result.results-from' | trans }} <span> {{ searchCurrentPageResultStart }} - {{ searchCurrentPageResultEnd }} </span> {{ 'fulltext-seach.search-list.result.of' | trans }} {{ searchTotalHits }}
</div>
</div>
{% endif %}
<div class=\"section p-0 container-fluid\">
<div class=\"search-list\">
{% if searchHasResults|default(null) %}
<ul class=\"search-results list-unstyled\">
{% for i,searchResult in searchResults %}
<li class=\"search-result\">
<div class=\"search-result-content col-12 col-sm-10 offset-sm-1 col-lg-6 offset-lg-3\">
<a href=\"{{ searchResult.url }}\" class=\"search-result-title\">
{% if searchResult.title|default(null) %}
{{ searchResult.title | raw }}
{% endif %}
{% if searchResult.h1|default(null) %}
{{ searchResult.h1 | raw }}
{% endif %}
</a>
<p class=\"search-result-summary\">{{ searchResult.summary | raw }}</p>
<a href=\"{{ searchResult.url }}\" class=\"read-more\"><i class=\"lorch-icon lorch-icon-next\"></i>
{{ 'fulltext-seach.search-list.result.read-more' | trans }}
</a>
</div>
</li>
{% endfor %}
</ul>
{% set paginationVariables = full_text_search_pagination() %}
{% if searchAllPages > 1 %}
<div class=\"paginator\">
{% if paginationVariables.currentSearchPage > 1 %}
<a class=\"previous icon-arrow-left\"
href=\"{{ paginationVariables.searchUrl }}{{ paginationVariables.searchUrlData }}&page={{ paginationVariables.currentSearchPage - 1 }}\"></a>
{% else %}
<a class=\"previous icon-arrow-left icon-arrow-left-disabled\"
href=\"{{ paginationVariables.searchUrl }}{{ paginationVariables.searchUrlData }}&page={{ paginationVariables.currentSearchPage - 1 }}\"></a>
{% endif %}
{% for i in paginationVariables.searchPageStart..paginationVariables.searchPageEnd %}
{% if i == paginationVariables.searchPageEnd %}
<a {{ paginationVariables.currentSearchPage == i ? 'class=\"active\"' : '' }}
href=\"{{ paginationVariables.searchUrl }}{{ paginationVariables.searchUrlData }}&page={{ i }}#results\">{{ i }}</a>
{% else %}
<a {{ paginationVariables.currentSearchPage == i ? 'class=\"active\"' : '' }}
href=\"{{ paginationVariables.searchUrl }}{{ paginationVariables.searchUrlData }}&page={{ i }}#results\">{{ i }}</a>
<span class=\"pagination-line\">|</span>
{% endif %}
{% endfor %}
{% if paginationVariables.searchPageEnd > paginationVariables.currentSearchPage %}
<a class=\"next icon-arrow-right\"
href=\"{{ paginationVariables.searchUrl }}{{ paginationVariables.searchUrlData }}&page={{ paginationVariables.currentSearchPage + 1 }}#results\"></a>
{% else %}
<a class=\"next icon-arrow-right icon-arrow-right-disabled\"
href=\"{{ paginationVariables.searchUrl }}{{ paginationVariables.searchUrlData }}&page={{ paginationVariables.currentSearchPage + 1 }}#results\"></a>
{% endif %}
</div>
{% endif %}
{% else %}
{% if searchQuery|default(null) is not empty %}
<div class=\"section pt-0 no-results col-10 offset-1 col-lg-6 offset-lg-3\">
<h5>{{ 'fulltext-seach.search-list.result.none' | trans }}</h5>
{% include '@LuceneSearch/List/Partial/suggestions.html.twig' %}
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>
{% endblock %}
", "@App/ObjectViews/search-results.html.twig", "/srv/httpd/vhosts/lorch-test/releases/58/src/AppBundle/Resources/views/ObjectViews/search-results.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 8, "for" => 152, "set" => 172, "include" => 207);
static $filters = array("default" => 8, "escape" => 9, "trans" => 9, "raw" => 157);
static $functions = array("pimcore_input" => 29, "pimcore_area" => 138, "full_text_search_pagination" => 172, "range" => 183);
try {
$this->sandbox->checkSecurity(
['if', 'for', 'set', 'include'],
['default', 'escape', 'trans', 'raw'],
['pimcore_input', 'pimcore_area', 'full_text_search_pagination', 'range']
);
} 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;
}
}
}