<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* @theme/news/embedNewsArticle.html.twig */
class __TwigTemplate_e45ef693ee0e5e5bcf9daa4eefc7d24d extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "@theme/news/embedNewsArticle.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@theme/news/embedNewsArticle.html.twig"));
// line 1
yield "<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org\",
\"@type\": \"BlogPosting\",
\"headline\": \"";
// line 5
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 5, $this->source); })()), "title", [], "any", false, false, false, 5), "html", null, true);
yield "\",
\"alternativeHeadline\": \"";
// line 6
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::striptags(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 6, $this->source); })()), "subtitle", [], "any", false, false, false, 6)), "html", null, true);
yield "\",
\"datePublished\": \"";
// line 7
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 7, $this->source); })()), "publishDate", [], "any", false, false, false, 7), "c"), "html", null, true);
yield "\",
\"dateModified\": \"";
// line 8
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 8, $this->source); })()), "updatedAt", [], "any", false, false, false, 8), "c"), "html", null, true);
yield "\",
\"author\": {
\"@type\": \"Organization\",
\"name\": \"";
// line 11
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["sitename"]) || array_key_exists("sitename", $context) ? $context["sitename"] : (function () { throw new RuntimeError('Variable "sitename" does not exist.', 11, $this->source); })()), "html", null, true);
yield "\"
},
\"publisher\": {
\"@type\": \"Organization\",
\"name\": \"";
// line 15
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["sitename"]) || array_key_exists("sitename", $context) ? $context["sitename"] : (function () { throw new RuntimeError('Variable "sitename" does not exist.', 15, $this->source); })()), "html", null, true);
yield "\",
\"logo\": {
\"@type\": \"ImageObject\",
\"url\": \"";
// line 18
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["siteurl"]) || array_key_exists("siteurl", $context) ? $context["siteurl"] : (function () { throw new RuntimeError('Variable "siteurl" does not exist.', 18, $this->source); })()), "html", null, true);
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/logo.png"), "cropResize", 560, 120), "html", null, true);
yield "\",
\"width\": 560,
\"height\": 120
}
},
\"image\": {
\"@type\": \"ImageObject\",
\"url\": \"";
// line 25
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["siteurl"]) || array_key_exists("siteurl", $context) ? $context["siteurl"] : (function () { throw new RuntimeError('Variable "siteurl" does not exist.', 25, $this->source); })()), "html", null, true);
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()(("/userfiles/images/news/" . CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 25, $this->source); })()), "image", [], "any", false, false, false, 25)), "zoomCrop", 800, 600), "html", null, true);
yield "\",
\"width\": 800,
\"height\": 600
},
\"description\": \"";
// line 29
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::striptags(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 29, $this->source); })()), "excerpt", [], "any", false, false, false, 29)), "html", null, true);
yield "\",
\"articleBody\": \"";
// line 30
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::striptags(Twig\Extension\CoreExtension::replace(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 30, $this->source); })()), "content", [], "any", false, false, false, 30), ["
" => " ", "
" => " "])), "html", null, true);
yield "\"
}
</script>
<div class=\"page-hero page-hero--themed page-hero--no-bg page-hero--fade-out news-article__hero\">
<div class=\"container\">
<div class=\"page-hero__content ";
// line 36
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 36, $this->source); })()), "image", [], "any", false, false, false, 36) == null)) {
yield "!col-span-12";
}
yield "\">";
// line 37
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('breadcrumbs')->getCallable()((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 37, $this->source); })()), $this->env->getFunction('domCheckIgnore')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 37, $this->source); })()), "request", [], "any", false, false, false, 37), "pathinfo", [], "any", false, false, false, 37))), "html", null, true);
// line 38
yield "<p class=\"text-sm mb-2\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 38, $this->source); })()), "publishDate", [], "any", false, false, false, 38), "d F Y"), "html", null, true);
yield "</p>
<h1 class=\"page-hero__title\">
";
// line 40
yield $this->env->getFunction('allowInlineEditor')->getCallable()((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 40, $this->source); })()), "title");
yield "
</h1>
<div class=\"page-hero__subtitle\">
";
// line 43
yield $this->env->getFunction('allowInlineEditor')->getCallable()((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 43, $this->source); })()), "subtitle");
// line 44
yield "</div>
</div>
";
// line 46
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 46, $this->source); })()), "image", [], "any", false, false, false, 46)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 47
yield " <div class=\"page-hero__image\">
<img
src=\"";
// line 49
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()(("/" . CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 49, $this->source); })()), "getFullImagePath", [], "any", false, false, false, 49)), "zoomCrop", 1700, 700), "html", null, true);
yield "\"
alt=\"";
// line 50
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 50, $this->source); })()), "title", [], "any", false, false, false, 50), "html", null, true);
yield "\"
>
</div>
";
}
// line 54
yield " </div>
</div>
</div>
<article class=\"news-article\">
<div class=\"container\">
<div class=\"news-article__content cms-area\">
";
// line 60
yield (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 60, $this->source); })()), "isActive", [], "any", false, false, false, 60) && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 60, $this->source); })()), "publishDate", [], "any", false, false, false, 60) <= $this->extensions['Twig\Extension\CoreExtension']->convertDate()))) ? ("") : ("<h2>PREVIEW - Article not active</h2>"));
yield "
";
// line 61
yield $this->env->getFunction('allowInlineEditor')->getCallable()((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 61, $this->source); })()), "content");
yield "
";
// line 62
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 62, $this->source); })()), "ctaText", [], "any", false, false, false, 62) && CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 62, $this->source); })()), "ctaLink", [], "any", false, false, false, 62))) {
// line 63
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 63, $this->source); })()), "ctaLink", [], "any", false, false, false, 63), "html", null, true);
yield "\" class=\"button mt-10\">";
// line 64
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 64, $this->source); })()), "ctaText", [], "any", false, false, false, 64), "html", null, true);
// line 65
yield "</a>
";
}
// line 67
yield " </div>
</div>
</article>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "@theme/news/embedNewsArticle.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 188 => 67, 184 => 65, 182 => 64, 178 => 63, 176 => 62, 172 => 61, 168 => 60, 160 => 54, 153 => 50, 149 => 49, 145 => 47, 143 => 46, 139 => 44, 137 => 43, 131 => 40, 125 => 38, 123 => 37, 118 => 36, 108 => 30, 104 => 29, 96 => 25, 85 => 18, 79 => 15, 72 => 11, 66 => 8, 62 => 7, 58 => 6, 54 => 5, 48 => 1,);
}
public function getSourceContext(): Source
{
return new Source("<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org\",
\"@type\": \"BlogPosting\",
\"headline\": \"{{ news.title }}\",
\"alternativeHeadline\": \"{{ news.subtitle|striptags }}\",
\"datePublished\": \"{{ news.publishDate|date('c') }}\",
\"dateModified\": \"{{ news.updatedAt|date('c') }}\",
\"author\": {
\"@type\": \"Organization\",
\"name\": \"{{ sitename }}\"
},
\"publisher\": {
\"@type\": \"Organization\",
\"name\": \"{{ sitename }}\",
\"logo\": {
\"@type\": \"ImageObject\",
\"url\": \"{{ siteurl }}{{ imageCache(asset('build/images/logo.png'), 'cropResize', 560, 120) }}\",
\"width\": 560,
\"height\": 120
}
},
\"image\": {
\"@type\": \"ImageObject\",
\"url\": \"{{ siteurl }}{{ imageCache('/userfiles/images/news/' ~ news.image, 'zoomCrop', 800, 600) }}\",
\"width\": 800,
\"height\": 600
},
\"description\": \"{{ news.excerpt|raw|striptags }}\",
\"articleBody\": \"{{ news.content|replace({'\\n': ' ', '\\r': ' '})|striptags }}\"
}
</script>
<div class=\"page-hero page-hero--themed page-hero--no-bg page-hero--fade-out news-article__hero\">
<div class=\"container\">
<div class=\"page-hero__content {% if news.image == NULL %}!col-span-12{% endif %}\">
{{- breadcrumbs(news, domCheckIgnore(app.request.pathinfo) ) -}}
<p class=\"text-sm mb-2\">{{ news.publishDate | date('d F Y') }}</p>
<h1 class=\"page-hero__title\">
{{ allowInlineEditor(news, 'title')|raw }}
</h1>
<div class=\"page-hero__subtitle\">
{{ allowInlineEditor(news, 'subtitle')|raw -}}
</div>
</div>
{% if news.image %}
<div class=\"page-hero__image\">
<img
src=\"{{ imageCache('/' ~ news.getFullImagePath, 'zoomCrop', 1700, 700) }}\"
alt=\"{{ news.title }}\"
>
</div>
{% endif %}
</div>
</div>
</div>
<article class=\"news-article\">
<div class=\"container\">
<div class=\"news-article__content cms-area\">
{{ news.isActive and news.publishDate <= date() ? '' : '<h2>PREVIEW - Article not active</h2>' }}
{{ allowInlineEditor(news, 'content')|raw }}
{% if news.ctaText and news.ctaLink %}
<a href=\"{{ news.ctaLink }}\" class=\"button mt-10\">
{{- news.ctaText -}}
</a>
{% endif %}
</div>
</div>
</article>
", "@theme/news/embedNewsArticle.html.twig", "/var/www/html/t/taurushr/templates/themes/base/news/embedNewsArticle.html.twig");
}
}