Bugfix
This commit is contained in:
@@ -158,14 +158,9 @@ Contao 5 – Frontend Module Template
|
|||||||
for (const hit of hits) {
|
for (const hit of hits) {
|
||||||
|
|
||||||
const node = template.content.cloneNode(true);
|
const node = template.content.cloneNode(true);
|
||||||
|
const item = node.firstElementChild;
|
||||||
|
|
||||||
const image = node.querySelector('.siteimage');
|
// TYPE → CSS-Klasse
|
||||||
const title = node.querySelector('.title');
|
|
||||||
const extract = node.querySelector('.extract');
|
|
||||||
const path = node.querySelector('.pfad');
|
|
||||||
const link = node.querySelector('.masterurl');
|
|
||||||
|
|
||||||
// Type → CSS-Klasse
|
|
||||||
if (hit.type) {
|
if (hit.type) {
|
||||||
item.classList.add(
|
item.classList.add(
|
||||||
String(hit.type)
|
String(hit.type)
|
||||||
@@ -174,6 +169,13 @@ Contao 5 – Frontend Module Template
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const image = item.querySelector('.siteimage');
|
||||||
|
const img = image.querySelector('img');
|
||||||
|
const title = item.querySelector('.title');
|
||||||
|
const extract = item.querySelector('.extract');
|
||||||
|
const path = item.querySelector('.pfad');
|
||||||
|
const link = item.querySelector('.masterurl');
|
||||||
|
|
||||||
title.textContent = hit.title || '';
|
title.textContent = hit.title || '';
|
||||||
link.href = hit.url || '#';
|
link.href = hit.url || '#';
|
||||||
link.title = hit.title || '';
|
link.title = hit.title || '';
|
||||||
|
|||||||
Reference in New Issue
Block a user