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 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}}
  {{description type=html}}

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