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:
|
tablist:
|
||||||
meta:
|
meta:
|
||||||
expand: general
|
expand: assignments
|
||||||
tabs:
|
tabs:
|
||||||
- name: general
|
- name: general
|
||||||
meta:
|
meta:
|
||||||
@ -61,6 +61,7 @@ meta:
|
|||||||
source: meta
|
source: meta
|
||||||
subFields:
|
subFields:
|
||||||
- source: pages
|
- source: pages
|
||||||
|
- source: linkedArticleEntries
|
||||||
|
|
||||||
imageFilter:
|
imageFilter:
|
||||||
xs:
|
xs:
|
||||||
@ -160,6 +161,24 @@ fields:
|
|||||||
name: "path"
|
name: "path"
|
||||||
params:
|
params:
|
||||||
sort: "path"
|
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
|
- name: tags
|
||||||
type: string[]
|
type: string[]
|
||||||
meta:
|
meta:
|
||||||
|
@ -11,7 +11,7 @@ meta:
|
|||||||
# Navigationseintrag in der Admin-UI
|
# Navigationseintrag in der Admin-UI
|
||||||
label: { de: "Extern", en: "External" }
|
label: { de: "Extern", en: "External" }
|
||||||
# Icon (Material UI) für den Navigationseintrag
|
# Icon (Material UI) für den Navigationseintrag
|
||||||
muiIcon: web
|
muiIcon: download
|
||||||
# Identifizierung eines Eintrags für z.B. Select-Boxen in der Admin-UI
|
# Identifizierung eines Eintrags für z.B. Select-Boxen in der Admin-UI
|
||||||
rowIdentTpl: { twig: "{{ path }}" }
|
rowIdentTpl: { twig: "{{ path }}" }
|
||||||
# Standardsortierung der Liste
|
# Standardsortierung der Liste
|
||||||
|
@ -9,9 +9,9 @@ meta:
|
|||||||
collections:
|
collections:
|
||||||
- !include collections/general.yml
|
- !include collections/general.yml
|
||||||
- !include collections/navigation.yml
|
- !include collections/navigation.yml
|
||||||
- !include collections/tags.yml
|
|
||||||
- !include collections/articles.yml
|
- !include collections/articles.yml
|
||||||
- !include collections/content.yml
|
- !include collections/content.yml
|
||||||
- !include collections/external.yml
|
- !include collections/external.yml
|
||||||
- !include collections/contact_form.yml
|
- !include collections/contact_form.yml
|
||||||
|
- !include collections/tags.yml
|
||||||
- !include collections/ssr.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[]> => {
|
export const getArticles = async (collectionName: string, apiParams: APIParams): Promise<TibiArticle[]> => {
|
||||||
try {
|
try {
|
||||||
let response = await api<TibiArticle[]>(collectionName, {
|
let apiParameters = {
|
||||||
method: "get",
|
method: "get",
|
||||||
offset: 0,
|
offset: 0,
|
||||||
filter: {
|
filter: {},
|
||||||
"article.general.public": true,
|
|
||||||
},
|
|
||||||
sort: "article.general.sort",
|
sort: "article.general.sort",
|
||||||
...apiParams,
|
...apiParams,
|
||||||
})
|
}
|
||||||
|
apiParameters.filter["article.general.public"] = true
|
||||||
|
|
||||||
|
let response = await api<TibiArticle[]>(collectionName, apiParameters)
|
||||||
return response.data
|
return response.data
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user