Blueprint: Preset for files without pagination?

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. :wink:

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

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

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… :innocent:

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.

Could happen to the best. :slight_smile:

Thank you for your help! :hugs:

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! :muscle:

I’ve found a dead link, Sonja:

The link referes to the homepage and should link this one: