Show a gallery in the side bar, ond other images in text

I’m working on a website with two sections: a content section which is filled with content from a Textarea (the owner of the site doesn’t like blocks) and in the other section there are only images. So I made a blueprint that has a content textarea on the left, and an option to upload images on the right.

With this setup all images are shown in the second section, also the images that are placed in the textarea. But we don’t want those to show up in the second section, only the images that we specifically upload on the right side of the panel.

I hope it is clear what we’re trying to achieve. I’ll try it in other words just to be clear: I want a section on my page that displays a gallery of images, but that doesn’t display the images that are shown in the main content.

And I have no idea how to do this.

You can assign different templates to those files you upload via the files section and those you upload via the textarea. See the documentation.

Thank you very much for your answer. I’m trying to get my head around it but I think there’s this one piece of logic missing. I just don’t get it.

So while it does work that files I uploaded in the textarea are not shown in the section in the sidebar in the panel, these images do show up in the template.
So my problem is mostly with how to show only the right images in the template.

$images =  $page->images()->sortBy('sort');

This code shows all images from this page, also those uploaded in the textarea. But I can’t figure out how to show only the images I uploaded on the right side of my panel …

(I hope I don’t sound too ghibberish, I don’t think I have learned the right wording yet)

They show up, because you do not filter your images by the template you assigned through the section.

$images = $page->images()->template('whateveryouassignedtothesection');

Yes! That’s it! Thank you so much!