Denis
February 24, 2022, 6:08am
1
Hi!
My blueprint for my gallery looked like this:
title: Fotografien
sections:
Galerie:
type: files
layout: cards
limit: 150
image:
cover: true
ratio: 1/1
That worked great. The limit is important to me, because I want to see all images at once. My expectation is, that I’ll never show 150 images on one page.
But it could happen, that I’ll occasionally need some text above my gallery. So I’ve tried to get a textarea on a second tab. It works - except of the limit . My blueprint at the moment:
title: Fotografien
tabs:
Galerie:
icon: file-image
preset: files
layout: cards
limit: 150 #That's not working.
image:
cover: true
ratio: 1/1
Texte:
icon: file-text
fields:
text:
label: Text
type: textarea
Where is the mistake, I’ve made? Thank you in advance!
Dennis
texnixe
February 24, 2022, 7:17am
2
Don’t know why you want to use the preset, it’s not very flexible and uses the default limit
settings. Better stick with the sections.
tabs:
gallery:
icon: file-image
label: Galerie
sections:
gallery:
headline: Galerie
layout: cards
limit: 150 #That's not working.
image:
cover: true
ratio: 1/1
texts:
label: Texte
fields:
text:
label: Text
type: textarea
Denis
February 24, 2022, 7:34am
3
Hi Sonja!
Thank you for your reply. Your code results in an error:
Invalid section type (“gallery”)
I’ve switched line 6 to files: , than it works.
About the “preset”: I don’t get the pro and cons on presets, sections etc. So it’s a trail-and-error-development on my side…
texnixe
February 24, 2022, 8:46am
4
Haha forgot the section type:
tabs:
gallery:
icon: file-image
label: Galerie
sections:
gallery:
headline: Galerie
type: files
layout: cards
limit: 150 #That's not working.
image:
cover: true
ratio: 1/1
texts:
label: Texte
fields:
text:
label: Text
type: textarea
Presets are only useful if you can do with very basic default settings. I never use them.
Denis
February 24, 2022, 2:28pm
5
Could happen to the best.
Thank you for your help!
Meanwhile my final blueprint looks like this:
title: Fotografien
tabs:
Galerie:
icon: file-image
sections:
Galerie:
headline: Fotografien
type: files
layout: cards
limit: 150
image:
cover: true
ratio: 1/1
Texte:
icon: file-text
fields:
Seitentitel:
label: Titel auf der Seite anzeigen?
icon: h1
type: toggle
width: 1/4
Sortierung:
label: Wie sollen die Fotografien sortiert werden?
icon: settings
type: select
default: absteigend
options:
absteigend: Absteigend
aufsteigend: Aufsteigend
zufall: Zufall
width: 3/4
text:
label: Text
icon: text
type: textarea
size: mediumtitle: Fotografien
tabs:
Galerie:
icon: file-image
sections:
Galerie:
headline: Fotografien
type: files
layout: cards
limit: 150
image:
cover: true
ratio: 1/1
Texte:
icon: file-text
fields:
Seitentitel:
label: Titel auf der Seite anzeigen?
icon: h1
type: toggle
width: 1/4
Sortierung:
label: Wie sollen die Fotografien sortiert werden?
icon: settings
type: select
default: absteigend
options:
absteigend: Absteigend
aufsteigend: Aufsteigend
zufall: Zufall
width: 3/4
text:
label: Text
icon: text
type: textarea
size: medium
I’ve sorted out, how to add sorting-options. And my PHP-Code is working. Yay!
I’ve found a dead link, Sonja:
The link referes to the homepage and should link this one: