Image gallery and section nesting

Hello, everybody. I’m kind new to web development. I have a small hotel site to create which must allow the owner to admin its content, so I think Vapid could be a good solution.
I need the user to be able to create individual room pages with their own photo galleries in a carrousel. I know that I can generate the room pages using sections repeating content (example here) and the same for one picture gallery.
1 - Is there a way to nest sections (rooms and rooms.photos) or allowing multiple unlimited pictures per page?
2 - Alternative solution. Is it possible to create one picture gallery for all pictures as a section and allowing the admin to select the desired pictures for each room page? It means reading the fields of one section from another.
3 - Does Vapid have another type of section or feature I can use for this task?

Thank you for your help.

@adrianjgp Good question. Right now, there’s no way to created nested sections, or reading fields of one section from another. I think the best solution might be to pic a theoretical maximum number of photos, and use if tags to show/hide them. e.g.,

{{#section rooms}}
  <div class="slideshow">
    {{#if photo1}}{{photo1 type=image}}{{/#if}}
    {{#if photo2}}{{photo2 type=image required=false}}{{/#if}}
    {{#if photo3}}{{photo3 type=image required=false}}{{/#if}}
    {{#if photo4}}{{photo4 type=image required=false}}{{/#if}}
    {{#if photo5}}{{photo5 type=image required=false}}{{/#if}}
  </div>
  <h1>{{name}}</h1>
  {{description type=html}}
{{/section}}

Thank you. I had almost forgotten this question.
Yes, I guess that is the solution since the amount of photos is low and the pictures are yo be shown in their room pages only.

1 Like

Would be nice if there was a way for Vapid to intuit that these fields were related and know to only show another field on the Vapid admin page if the previous field was used. That way you don’t have to have a long list of empty fields.

Or it might even help to be able to group sections of fields where you might have a slideshow where each image also needs a title and description. Something like this maybe where 3 different fields all share the same name and that’s what links them?

{{#section rooms}}
  <div class="slideshow">
    {{#if photo1}}
            {{photo1 type=image}}
            <h2>{{photo1 type=text}}</h2>
            <figcaption >{{photo1 type=html editor=wysiwyg}}</figcaption>
    {{/#if}}
    {{{#if photo2}}
            {{photo2 type=image}}
            <h2>{{photo2 type=text}}</h2>
            <figcaption >{{photo2 type=html editor=wysiwyg}}</figcaption>
    {{/#if}}
    {{#if photo3}}
            {{photo3 type=image}}
            <h2>{{photo3 type=text}}</h2>
            <figcaption >{{photo3 type=html editor=wysiwyg}}</figcaption>
    {{/#if}}
    {{#if photo4}}
            {{photo4 type=image}}
            <h2>{{photo4 type=text}}</h2>
            <figcaption >{{photo4 type=html editor=wysiwyg}}</figcaption>
    {{/#if}}
  </div>
  <h1>{{name}}</h1>
  {{description type=html}}
{{/section}}

Yes, @aaron. That is the kind of feature I’d like to have.