Skip to content
Code-Schnipsel Gruppen Projekte
Commit 85fbafc6 erstellt von Michael Danielczok's avatar Michael Danielczok
Dateien durchsuchen

Merge branch 'dev'

Übergeordnete c33a0737 3af9af5a
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
1 Merge Request!25Update 'next-3.x' with latest changes from 'main'
......@@ -770,15 +770,14 @@ a.toTop:before {
height: 100%;
display: flex;
align-items: center;
padding: 10px 0;
}
.cologne-header-logo-link picture {
width: auto !important;
max-height: 100%;
height: 100%;
width: auto;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 10px 0;
}
.cologne-header-logo-link img {
......
......@@ -16,10 +16,22 @@
]);
/**
* Header
* Menu
*/
$homeLink = false;
$homeLinkText = false;
if (isset($templateSettings['homeLink']) && $templateSettings['homeLink']) {
$homeLink = true;
}
if (isset($templateSettings['homeLinkText']) && $templateSettings['homeLinkText'] !== '') {
$homeLinkText = $templateSettings['homeLinkText'];
}
$Menu = new QUI\Menu\MegaMenu([
'showStart' => false,
'showStart' => $homeLink,
'startText' => $homeLinkText,
'data-show-button-on-desktop' => 1,
'Project' => $Site->getProject()
]);
......
......@@ -267,10 +267,26 @@
<de><![CDATA[Template Cologne Einstellungen]]></de>
<en><![CDATA[Template Cologne Settings]]></en>
</locale>
<locale name="settings.general.title">
<de><![CDATA[Allgemeine-Einstellungen]]></de>
<en><![CDATA[General settings]]></en>
</locale>
<locale name="settings.shop.title">
<de><![CDATA[Shop-Einstellungen]]></de>
<en><![CDATA[Shop settings]]></en>
</locale>
<locale name="settings.general.homeLink">
<de><![CDATA[Startseite in der Navigation anzeigen]]></de>
<en><![CDATA[Show home link in the navigation]]></en>>
</locale>
<locale name="settings.general.homeLinkText">
<de><![CDATA[Link-Text]]></de>
<en><![CDATA[Link text]]></en>
</locale>
<locale name="settings.general.homeLinkText.desc">
<de><![CDATA[Wenn es leer ist, als Link-Text wird der Titel der Startseite verwendet.]]></de>
<en><![CDATA[If it is empty, the title of the start page is used as link text.]]></en>
</locale>
<locale name="settings.shop.title">
<de><![CDATA[Shop-Einstellungen]]></de>
<en><![CDATA[Shop settings]]></en>
......
......@@ -5,6 +5,14 @@
<config>
<section name="templateCologne.settings">
<conf name="homeLink">
<type><![CDATA[bool]]></type>
<defaultvalue>0</defaultvalue>
</conf>
<conf name="homeLinkText">
<type><![CDATA[string]]></type>
</conf>
<conf name="showRetailPrice">
<type><![CDATA[bool]]></type>
<defaultvalue>1</defaultvalue>
......@@ -209,6 +217,31 @@
</text>
<icon>URL_BIN_DIR/22x22/quiqqer.png</icon>
<settings title="templateCologne.settings"
name="templateCologne.settings.general">
<title>
<locale group="quiqqer/template-cologne"
var="settings.general.title"
/>
</title>
<input conf="templateCologne.settings.homeLink" type="checkbox">
<text>
<locale group="quiqqer/template-cologne"
var="settings.general.homeLink"
/>
</text>
</input>
<input conf="templateCologne.settings.homeLinkText" type="text" data-qui="controls/lang/InputMultiLang">
<text>
<locale group="quiqqer/template-cologne"
var="settings.general.homeLinkText"
/>
</text>
</input>
</settings>
<settings title="templateCologne.settings"
name="templateCologne.settings.shop">
<title>
......
......@@ -71,17 +71,19 @@ public static function getConfig($params)
/* @var $Project QUI\Projects\Project */
$Project = $params['Project'];
$cacheName = md5($params['Site']->getId().$Project->getName().$Project->getLang());
$cacheName = md5($params['Site']->getId() . $Project->getName() . $Project->getLang());
try {
return QUI\Cache\Manager::get(
'quiqqer/templateCologne/'.$cacheName
'quiqqer/templateCologne/' . $cacheName
);
} catch (QUI\Exception $Exception) {
}
$config = [];
$lang = $Project->getLang();
/**
* no header?
* no breadcrumb?
......@@ -182,22 +184,42 @@ public static function getConfig($params)
$config['CategoriesMenu'] = QUI\ControlUtils::parse($CategoriesMenu);
}
/***
* Mega menu settings
*/
$homeLink = false;
$homeLinkText = '';
if ($Project->getConfig('templateCologne.settings.homeLink')) {
$homeLink = $Project->getConfig('templateCologne.settings.homeLink');
}
if ($Project->getConfig('templateCologne.settings.homeLinkText')) {
$text = json_decode($Project->getConfig('templateCologne.settings.homeLinkText'), true);
if (isset($text[$lang]) && $text[$lang] !== '') {
$homeLinkText = $text[$lang];
}
}
// predefined footer
$config += self::getPredefinedFooter($Project);
$config['header'] = $header;
$config['pageTitle'] = $pageTitle;
$config['showBreadcrumb'] = $showBreadcrumb;
$config['settingsCSS'] = '<style>'.$settingsCSS.'</style>';
$config['typeClass'] = 'type-'.str_replace(['/', ':'], '-', $Site->getAttribute('type'));
$config['settingsCSS'] = '<style>' . $settingsCSS . '</style>';
$config['typeClass'] = 'type-' . str_replace(['/', ':'], '-', $Site->getAttribute('type'));
$config['siteType'] = $siteType;
$config['basketStyle'] = $basketStyle;
$config['basketOpen'] = $basketOpen;
$config['showCategoryMenu'] = $showCategoryMenu;
$config['homeLink'] = $homeLink;
$config['homeLinkText'] = $homeLinkText;
// set cache
QUI\Cache\Manager::set(
'quiqqer/templateCologne/'.$cacheName,
'quiqqer/templateCologne/' . $cacheName,
$config
);
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren