Skip to content
Snippets Groups Projects

Support WDN templates 5.2

Merged Jeff Sturek requested to merge JSTUREK8/UNL_Search:support-5.2 into master
3 files
+ 11
11
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 4
4
@@ -31,7 +31,7 @@ $isEmbed = isset($_GET['embed']) && $_GET['embed'];
// While the site proper is skinned with a specific version, the templates used
// used in embed search need to be supported in legacy sites.
// ?embed=1 : 4.1
// ?embed=(not 1) : 5.1
// ?embed=(not 1) : 5.2
if ($isEmbed && $_GET['embed'] === '1') {
$pageTemplate = 'Fixed';
$page = Templates::factory($pageTemplate, Templates::VERSION_4_1);
@@ -47,7 +47,7 @@ if ($isEmbed && $_GET['embed'] === '1') {
} else {
$pageTemplate = 'AppLocal';
$page = Templates::factory($pageTemplate, Templates::VERSION_5_1);
$page = Templates::factory($pageTemplate, Templates::VERSION_5_2);
$templatePath = 'templates/5.0/';
$localScriptUrl = './js/search-tabs.min.js?v=' . $cacheVersion;
@@ -58,7 +58,7 @@ if ($isEmbed && $_GET['embed'] === '1') {
}
if (!$isEmbed) {
if (file_exists(__DIR__ . '/wdn/templates_5.1')) {
if (file_exists(__DIR__ . '/wdn/templates_5.2')) {
$page->setLocalIncludePath(__DIR__);
}
@@ -66,7 +66,7 @@ if ($isEmbed && $_GET['embed'] === '1') {
$page->head .= '<link rel="home" href="./" />';
// Add WDN Deprecated Styles
$page->head .= '<link rel="preload" href="/wdn/templates_5.1/css/deprecated.css" as="style" onload="this.onload=null;this.rel=\'stylesheet\'"> <noscript><link rel="stylesheet" href="/wdn/templates_5.1/css/deprecated.css"></noscript>';
$page->head .= '<link rel="preload" href="/wdn/templates_5.2/css/deprecated.css" as="style" onload="this.onload=null;this.rel=\'stylesheet\'"> <noscript><link rel="stylesheet" href="/wdn/templates_5.2/css/deprecated.css"></noscript>';
// no menu items, so hide mobile menu
$page->addStyleDeclaration("#dcf-mobile-toggle-menu {display: none!important}");
Loading