Tags Collection nach unten verschoben. Icon für external Collection geändert. Content Collection erweitert um neues linkedEntries field.
This commit is contained in:
parent
d8e4f9c902
commit
49896d6978
Binary file not shown.
@ -39,7 +39,7 @@ meta:
|
||||
|
||||
tablist:
|
||||
meta:
|
||||
expand: general
|
||||
expand: assignments
|
||||
tabs:
|
||||
- name: general
|
||||
meta:
|
||||
@ -61,6 +61,7 @@ meta:
|
||||
source: meta
|
||||
subFields:
|
||||
- source: pages
|
||||
- source: linkedArticleEntries
|
||||
|
||||
imageFilter:
|
||||
xs:
|
||||
@ -160,6 +161,24 @@ fields:
|
||||
name: "path"
|
||||
params:
|
||||
sort: "path"
|
||||
- name: linkedArticleEntries
|
||||
type: string[]
|
||||
meta:
|
||||
hideInRoot: true
|
||||
widget: linkedEntries
|
||||
helperText:
|
||||
de: "Verknüpfte Artikel dieser Seite."
|
||||
en: "Linked articles to this page."
|
||||
label:
|
||||
de: Verknüpfte Artikel
|
||||
en: Linked articles
|
||||
defaultValue: []
|
||||
choices:
|
||||
endpoint: "articles"
|
||||
params:
|
||||
sort: "article.publish_date.from"
|
||||
filter: { "article.assignments.pages": { source: "path" } }
|
||||
template: { twig: "{{ article.content.title }}" }
|
||||
- name: tags
|
||||
type: string[]
|
||||
meta:
|
||||
|
@ -11,7 +11,7 @@ meta:
|
||||
# Navigationseintrag in der Admin-UI
|
||||
label: { de: "Extern", en: "External" }
|
||||
# Icon (Material UI) für den Navigationseintrag
|
||||
muiIcon: web
|
||||
muiIcon: download
|
||||
# Identifizierung eines Eintrags für z.B. Select-Boxen in der Admin-UI
|
||||
rowIdentTpl: { twig: "{{ path }}" }
|
||||
# Standardsortierung der Liste
|
||||
|
@ -9,9 +9,9 @@ meta:
|
||||
collections:
|
||||
- !include collections/general.yml
|
||||
- !include collections/navigation.yml
|
||||
- !include collections/tags.yml
|
||||
- !include collections/articles.yml
|
||||
- !include collections/content.yml
|
||||
- !include collections/external.yml
|
||||
- !include collections/contact_form.yml
|
||||
- !include collections/tags.yml
|
||||
- !include collections/ssr.yml
|
||||
|
11
src/api.ts
11
src/api.ts
@ -218,15 +218,16 @@ export const getGeneralInformation = async (): Promise<GeneralInfo[]> => {
|
||||
|
||||
export const getArticles = async (collectionName: string, apiParams: APIParams): Promise<TibiArticle[]> => {
|
||||
try {
|
||||
let response = await api<TibiArticle[]>(collectionName, {
|
||||
let apiParameters = {
|
||||
method: "get",
|
||||
offset: 0,
|
||||
filter: {
|
||||
"article.general.public": true,
|
||||
},
|
||||
filter: {},
|
||||
sort: "article.general.sort",
|
||||
...apiParams,
|
||||
})
|
||||
}
|
||||
apiParameters.filter["article.general.public"] = true
|
||||
|
||||
let response = await api<TibiArticle[]>(collectionName, apiParameters)
|
||||
return response.data
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
|
Loading…
Reference in New Issue
Block a user