{% set asset = null %} {% set images = (content.centerImage ?? []) %} {% for image in images %} {% set asset = preloadedImageAssets['uxe' ~ assetId] ?? craft.assets() .id(image) .kind('image') .one() %} {% endfor %} <div class="uxeHorizontalLineContainer {{ asset ? 'uxe-imageCentered' : '' }} {{ content.alignLineSide ?? '' }} uxe-max-width-{{ content.maxWidth ?? '' }} uxe-align-self-{{ content.alignSide ?? '' }} {% include 'uxelementstemplates/front_end/_includes/_includes/overall_styling.twig' %}" data-type="horizontalLine" data-element-pos="{{ elementPosition ?? -1 }}" data-ux-element-id="{{ content.uxElementId ?? '' }}"> <hr class="uxe-hr-color-{{ content.horizontalLineColor ?? 'white' }}"> {% if asset %} {% set defaultImageSize = 350 %} {% set horizontalImageCrop = {
{% set asset = null %} {% set images = (content.centerImage ?? []) %} {% for image in images %} {% set asset = preloadedImageAssets['uxe' ~ assetId] ?? craft.assets() .id(image) .kind('image') .one() %} {% endfor %} <div class="uxeHorizontalLineContainer {{ asset ? 'uxe-imageCentered' : '' }} {{ content.alignLineSide ?? '' }} uxe-max-width-{{ content.maxWidth ?? '' }} uxe-align-self-{{ content.alignSide ?? '' }} {% include 'uxelementstemplates/front_end/_includes/_includes/overall_styling.twig' %}" data-type="horizontalLine" data-element-pos="{{ elementPosition ?? -1 }}" data-ux-element-id="{{ content.uxElementId ?? '' }}"> <hr class="uxe-hr-color-{{ content.horizontalLineColor ?? 'white' }}">
public function yield(array $context, array $blocks = []): iterable { $context += $this->env->getGlobals(); $blocks = array_merge($this->blocks, $blocks); try { yield from $this->doDisplay($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($this->getSourceContext()); } // this is mostly useful for \Twig\Error\LoaderError exceptions
{% set lastIconElement = (allContentsAsArray[loop.index].type ?? '') != 'iconWithTextAndButton' %} {% set lastContactElement = (allContentsAsArray[loop.index].type ?? '') != 'contactPerson' %} {% set lastBrandLogoElement = (allContentsAsArray[loop.index].type ?? '') != 'clickableBrandLogos' %} {% set lastIconWithTextAsideElement = (allContentsAsArray[loop.index].type ?? '') != 'iconWithTextAside' %} {% set lastTopicGalleryElement = (allContentsAsArray[loop.index].type ?? '') != 'topicGalleryElement' %} {% set lastImageTextOptionsElement = (allContentsAsArray[loop.index].type ?? '') != 'imageTextOptions' %} {% include 'uxelementstemplates/front_end/_includes/' ~ content.type ~ '.twig' ignore missing %} {% include 'ux_elements_custom/elements/_front_end/' ~ content.type ~ '.twig' ignore missing %} {% if content.type == 'backgroundSection' %} {% set backgroundSectionHasStarted = true %} {% set backgroundSectionTextHasStarted = false %} {% set fullScreenPopupHasStarted = false %}
public static function captureOutput(iterable $body): string { $level = ob_get_level(); ob_start(); try { foreach ($body as $data) { echo $data; } } catch (\Throwable $e) { while (ob_get_level() > $level) { ob_end_clean(); }
{% if allContentsAsArray and (allContentsAsArray ?? [])|length > 0 %} {% apply spaceless %} {% set targetLanguage = craft.uxtranslations.getTargetLanguage() %} {% set amountClaps = craft.uxeelementclaps.elementClapped(vatiant.id ?? entry.id ?? '-1').count() + 2 %} {% set amountViews = (craft.uxepageviews.elementVisited(vatiant.id ?? entry.id ?? '-1').orderBy('elementVisitedCollected desc').limit(1).one().elementVisitedCollected ?? 0) + 5 %} {% set amountViewsCache = (amountViews % 7 == 0) ? (amountViews) : (amountViews - (amountViews % 7)) %}
public function yield(array $context, array $blocks = []): iterable { $context += $this->env->getGlobals(); $blocks = array_merge($this->blocks, $blocks); try { yield from $this->doDisplay($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($this->getSourceContext()); } // this is mostly useful for \Twig\Error\LoaderError exceptions
{ return $this->blocks; } public function display(array $context, array $blocks = []): void { foreach ($this->yield($context, $blocks) as $data) { echo $data; } } public function render(array $context): string {
if ($this->env->isDebug()) { ob_start(); } else { ob_start(function () { return ''; }); } try { $this->display($context); } catch (\Throwable $e) { while (ob_get_level() > $level) { ob_end_clean(); } throw $e;
private Template $template, ) { } public function render(array $context = []): string { return $this->template->render($context); } public function display(array $context = []) { // using func_get_args() allows to not expose the blocks argument // as it should only be used by internal code
* @throws LoaderError When the template cannot be found * @throws SyntaxError When an error occurred during compilation * @throws RuntimeError When an error occurred during rendering */ public function render($name, array $context = []): string { return $this->load($name)->render($context); } /** * Displays a template. * * @param string|TemplateWrapper $name The template name
// Render and return $renderingTemplate = $this->_renderingTemplate; $this->_renderingTemplate = $template; try { $output = $this->getTwig()->render($template, $variables); } finally { $this->_renderingTemplate = $renderingTemplate; $this->setTemplateMode($oldTemplateMode); } $this->afterRenderTemplate($template, $variables, $templateMode, $output);
$json = file_get_contents($fileName); return json_decode($json) ?? []; } public function renderFrontendOfUXElementsField($uxElementsContents, $entry = null, $uxeFieldName = 'default', $base64 = false, $sectionAround = true, $showCategoryMenu = false) { $renderedUxElements = Craft::$app->view->renderTemplate( 'uxelementstemplates/front_end/renderAllUxElements.twig', ['allContentsAsArray' => $uxElementsContents, 'entry' => $entry, 'uxeFieldName' => ($uxeFieldName ?? 'default'), 'base64Img' => $base64, 'sectionAround' => $sectionAround, 'showCategoryMenu' => $showCategoryMenu]); if($base64) { $renderedUxElements = $this->replaceImagesWithBase64($renderedUxElements, './'); } return $renderedUxElements; }
{% set suffixElements = (globalUxElements.suffix ?? '[]')|json_decode %} {% if suffixElements is array and entry.uxElementsDefaultContentsField is array %} {% set mergedElements = entry.uxElementsDefaultContentsField|merge(suffixElements ?? []) %} {% set entry = entry|merge({'uxElementsDefaultContentsField' : mergedElements}) %} {% endif %} {{ entry.uxElementsDefaultContentsField|renderFrontendOfUxElementsField(entry, 'default', null, null, true)|raw }} {% if (entry.enabled ?? '') == false and uxElementsGlobalsUnderConstruction.uxElementsConstructionClientUnlockCode is not empty %} <section class="uxe_publishEntryContainer uxe_contactForm uxe_shapeButtons-{{ uxElementsGlobalsStyling.uxElementsShapesOfButtons ?? '' }}"> <form method="post" action="./actions/uxelements/unlock-entry/confirm-unlock/"> <div class="input_container"> <input type="number" name="unlockCode" placeholder="Ihr Code" required/>
public static function captureOutput(iterable $body): string { $level = ob_get_level(); ob_start(); try { foreach ($body as $data) { echo $data; } } catch (\Throwable $e) { while (ob_get_level() > $level) { ob_end_clean(); }
{% set uxElementsGlobalsElement = craft.uxglobals.brandingSet() ?? uxElementsGlobalsElement %} {% set uxElementsGlobalsStyling = uxElementsGlobalsStyling ?? craft.uxglobals.stylingSet() %} {% set uxElementsGlobalsMenuStyling = craft.uxglobals.menuSet() ?? uxElementsGlobalsMenuStyling %} {% set uxElementsSettings = craft.app.getPlugins().getPlugin('uxelements').getSettings() %} {% apply spaceless %} {% set uxElementsSessionSettings = craft.uxsessionsettings.getUpdatedSettings() %} {% set affiliatePartner = craft.uxsessionsettings.getAffiliatePartner() %} <!DOCTYPE html> <html lang="{{ craft.app.language }}">
public function yield(array $context, array $blocks = []): iterable { $context += $this->env->getGlobals(); $blocks = array_merge($this->blocks, $blocks); try { yield from $this->doDisplay($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($this->getSourceContext()); } // this is mostly useful for \Twig\Error\LoaderError exceptions
{ return $this->blocks; } public function display(array $context, array $blocks = []): void { foreach ($this->yield($context, $blocks) as $data) { echo $data; } } public function render(array $context): string {
if ($this->env->isDebug()) { ob_start(); } else { ob_start(function () { return ''; }); } try { $this->display($context); } catch (\Throwable $e) { while (ob_get_level() > $level) { ob_end_clean(); } throw $e;
private Template $template, ) { } public function render(array $context = []): string { return $this->template->render($context); } public function display(array $context = []) { // using func_get_args() allows to not expose the blocks argument // as it should only be used by internal code
* @throws LoaderError When the template cannot be found * @throws SyntaxError When an error occurred during compilation * @throws RuntimeError When an error occurred during rendering */ public function render($name, array $context = []): string { return $this->load($name)->render($context); } /** * Displays a template. * * @param string|TemplateWrapper $name The template name
// Render and return $renderingTemplate = $this->_renderingTemplate; $this->_renderingTemplate = $template; try { $output = $this->getTwig()->render($template, $variables); } finally { $this->_renderingTemplate = $renderingTemplate; $this->setTemplateMode($oldTemplateMode); } $this->afterRenderTemplate($template, $variables, $templateMode, $output);
$isRenderingPageTemplate = $this->_isRenderingPageTemplate; $this->_isRenderingPageTemplate = true; try { $this->beginPage(); echo $this->renderTemplate($template, $variables); $this->endPage(); } finally { $this->_isRenderingPageTemplate = $isRenderingPageTemplate; $this->setTemplateMode($oldTemplateMode); $output = ob_get_clean(); }
) { $view->registerAssetBundle(ContentWindowAsset::class); } // Render and return the template try { $response->content = $view->renderPageTemplate($behavior->template, $behavior->variables, $behavior->templateMode); } catch (Throwable $e) { $previous = $e->getPrevious(); if ($previous instanceof YiiExitException) { // Something called Craft::$app->end() if ($previous instanceof ExitException && $previous->output !== null) { echo $previous->output;
if (isset($this->formatters[$this->format])) { $formatter = $this->formatters[$this->format]; if (!is_object($formatter)) { $this->formatters[$this->format] = $formatter = Yii::createObject($formatter); } if ($formatter instanceof ResponseFormatterInterface) { $formatter->format($this); } else { throw new InvalidConfigException("The '{$this->format}' response formatter is invalid. It must implement the ResponseFormatterInterface."); } } elseif ($this->format === self::FORMAT_RAW) { if ($this->data !== null) { $this->content = $this->data;
/** * @inheritdoc */ protected function prepare(): void { parent::prepare(); $this->_isPrepared = true; } /** * Clear the output buffer to prevent corrupt downloads. *
public function send() { if ($this->isSent) { return; } $this->trigger(self::EVENT_BEFORE_SEND); $this->prepare(); $this->trigger(self::EVENT_AFTER_PREPARE); $this->sendHeaders(); $this->sendContent(); $this->trigger(self::EVENT_AFTER_SEND); $this->isSent = true; }
$response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send(); $this->state = self::STATE_END; return $response->exitStatus; } catch (ExitException $e) { $this->end($e->statusCode, isset($response) ? $response : null);
// Load shared bootstrap require dirname(__DIR__) . '/bootstrap.php'; // Load and run Craft /** @var craft\web\Application $app */ $app = require CRAFT_VENDOR_PATH . '/craftcms/cms/bootstrap/web.php'; $app->run();
$_GET = [ 'p' => 'ux-e-immobilien-nordzypern-projekte/project-reflexion', 'lang' => '', 'uxeGenerateCaches' => '2033642566', 'abMode' => '', ];