'; } 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 ''; } })(); ?>
Altisonus Logo

Blog

UNDER CONSTRUCTION

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://www.altisonus.com', '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( 'KVG Laboratories, LLC - ', 'RSS feed for ', 'https://www.altisonus.com', \CMS\CollectionBuilder::resolveOutputPath('', $rssFilename) ); } if ('false' === 'true') { $sitemapFilename = 'sitemap.xml' !== '' ? 'sitemap.xml' : 'sitemap.xml'; $sitemapURL = $query->generateSitemap( 'https://www.altisonus.com', \CMS\CollectionBuilder::resolveOutputPath('', $sitemapFilename) ); } try { $collection = $query->paginate($currentPage, $itemsPerPage)->get(); $collection->rssURL = $rssURL; $collection->sitemapURL = $sitemapURL; $pagination = $collection->pagination; } 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; $pagination = $collection->pagination; } $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 ]; ?>
each(function ($item) use ($collectionItemTemplate, $templateContext) { echo renderTemplate($collectionItemTemplate, ['item' => $item] + $templateContext); }); echo ''; ?>