'https://elements.greedo.de', 'resources' => [ 'path' => '../resources' ] ]; $cms = cms($options); $itemOptions = [ 'page_path' => $pagePath, 'pretty_urls' => $prettyUrls, 'site_url' => 'https://elements.greedo.de' ]; $item = $cms->item($sourcePath, $slug, $itemOptions); // Preview mode fallback: use the first file in the directory if (!$item && $isPreview) { if (is_dir($sourcePath)) { $files = glob($sourcePath . '/*.{md,markdown,txt}', GLOB_BRACE); if (!empty($files)) { $slug = pathinfo($files[0], PATHINFO_FILENAME); $item = $cms->item($sourcePath, $slug, $itemOptions); } } } // Store item for cross-template access ecms_set('item_rwE8AF6EE7_9719_4D1F_8ED7_22635F22D46A', $item); if (!$item) { error_log('CMS Item not found: ' . $sourcePath . ' ' . $slug); } })(); ?> Testumgebung '; } if ($wantsSitemap) { $sitemapFolder = ''; $sitemapFilename = 'sitemap.xml' !== '' ? 'sitemap.xml' : 'sitemap.xml'; $currentScriptDir = dirname($_SERVER['SCRIPT_FILENAME']); if (empty($sitemapFolder)) { $absoluteSitemapDir = $currentScriptDir; } else { $absoluteSitemapDir = realpath($currentScriptDir . '/' . $sitemapFolder); if ($absoluteSitemapDir === false) { $absoluteSitemapDir = $currentScriptDir . '/' . $sitemapFolder; } } $absoluteSitemapPath = rtrim($absoluteSitemapDir, '/') . '/' . $sitemapFilename; $sitemapFilePath = str_replace($_SERVER['DOCUMENT_ROOT'], '', $absoluteSitemapPath); echo ''; } })(); ?>
Building Photo

CMS

Testumgebung

is_array($_GET['tags'] ?? '') ? $_GET['tags'] : array_filter(array_map('trim', explode(',', $_GET['tags'] ?? ''))), default => array_filter(array_map('trim', explode(',', ''))) }; if (!empty($tags)) { $filters['tags'] = implode(',', $tags); } } $filterAuthor = "all"; if ($filterAuthor !== 'all') { $author = match ($filterAuthor) { 'url' => is_array($_GET['author'] ?? '') ? $_GET['author'] : array_filter(array_map('trim', explode(',', $_GET['author'] ?? ''))), default => array_filter(array_map('trim', explode(',', ''))) }; if (!empty($author)) { $filters['author'] = implode(',', $author); } } $filterFeatured = "all"; if ($filterFeatured !== 'all') { $filters['featured'] = $filterFeatured === 'true' ? 'true' : 'false'; } $filterStatus = "published"; if ($filterStatus !== 'all') { $filters['status'] = $filterStatus; } else { $filters['status'] = 'published'; } $filterDate = "past"; if ($filterDate === 'past') { $filters['date_before'] = date('Y-m-d H:i:s'); } elseif ($filterDate === 'future') { $filters['date_after'] = date('Y-m-d H:i:s'); } $orderBy = "date"; $orderDirection = "desc"; $ECMS_options = [ 'site_url' => 'https://elements.greedo.de', 'resources' => [ 'path' => '../resources' ] ]; $query = cms($ECMS_options)->collection($collectionPath) ->pagePath($pagePath) ->tagPagePath('') ->authorPagePath('') ->prettyUrls($prettyUrls) ->orderBy($orderBy, $orderDirection) ->offset($paginationOffset) ->applyFilters($filters); // RSS generation $rssURL = null; $sitemapURL = null; if ('false' === 'true') { $rssFilename = 'feed.xml' !== '' ? 'feed.xml' : 'feed.xml'; $rssURL = $query->generateFeed( 'Testumgebung - ', 'RSS feed for ', 'https://elements.greedo.de', \CMS\CollectionBuilder::resolveOutputPath('', $rssFilename) ); } if ('false' === 'true') { $sitemapFilename = 'sitemap.xml' !== '' ? 'sitemap.xml' : 'sitemap.xml'; $sitemapURL = $query->generateSitemap( 'https://elements.greedo.de', \CMS\CollectionBuilder::resolveOutputPath('', $sitemapFilename) ); } try { $collection = $query->paginate($currentPage, $itemsPerPage)->get(); $collection->rssURL = $rssURL; $collection->sitemapURL = $sitemapURL; } catch (Exception $e) { $collection = new \CMS\CollectionResult([], [ 'current_page' => 1, 'total_pages' => 1, 'total_items' => 0, 'items_per_page' => $itemsPerPage, 'has_prev' => false, 'has_next' => false ]); $collection->rssURL = $rssURL; $collection->sitemapURL = $sitemapURL; } $templateContext = [ 'pagination' => $collection->pagination, 'items' => $collection->items, 'collection' => $collection, 'filters' => $filters, 'orderBy' => $orderBy, 'orderDirection' => $orderDirection, 'collectionPath' => $collectionPath, 'pagePath' => $pagePath, 'itemsPerPage' => $itemsPerPage, 'paginationOffset' => $paginationOffset, 'prettyUrls' => $prettyUrls, 'collectionItemTemplateId' => null ]; ?>
wrapper around {{item.body}} since body already contains HTML $itemTemplate = str_replace('

{{item.body}}

', '{{item.body}}', $itemTemplate); if ($item) { echo renderTemplate($itemTemplate, ['item' => $item]); } else { echo 'No item found'; } ?> each(function ($item) use ($collectionItemTemplate, $templateContext) { echo renderTemplate($collectionItemTemplate, ['item' => $item] + $templateContext); }); echo ''; ?>
No item found (ensure Related Items is placed inside a CMS Item component)
getRelatedItems($criteria, $limit); } ?>
0) { foreach ($relatedItems as $relatedItem) { ob_start(); ?> $relatedItem]); } } ?>

North Eleven

Located in London, England.

© North Eleven