forked from cms/tibi-svelte-starter
Konfiguration von Seiten-Verknüpfungen nach Gespräch mit Marc geändert.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import Article from "../widgets/Article.svelte"
|
||||
|
||||
export let tags: string[] = null
|
||||
export let pages: string[] = null
|
||||
export let path: string = null
|
||||
|
||||
let articleEntries: CollectionEntry[] = []
|
||||
@@ -15,11 +16,15 @@
|
||||
}
|
||||
|
||||
if (tags && tags?.length) {
|
||||
filter["article.general.tags"] = { $in: tags }
|
||||
filter["article.assignments.tags"] = { $in: tags }
|
||||
}
|
||||
|
||||
if (pages && pages?.length) {
|
||||
filter["article.assignments.pages"] = { $in: pages }
|
||||
}
|
||||
|
||||
if (path) {
|
||||
filter["article.general.pages"] = { $in: [path] }
|
||||
filter["article.assignments.pages"] = { $in: [path] }
|
||||
}
|
||||
|
||||
getArticles("articles", { filter }).then((response) => {
|
||||
|
||||
Reference in New Issue
Block a user