How to fill a collection of collections

Hi,
so here is what I built for my customer:
A custom IA gets the absolute filepaths of a bunch of pdf-files somewhere on the system. These filepaths are returned as a collection and displayed using intuiface’s document template.
In short I am displaying an arbitrary number of documents in a collection.
Right now I am putting them in an asset grid with two rows. This gives me 2x3 documents on the screen.

The customer feels that it looks odd that this collection is filled from top to bottom. So that when three files are being displayed we see one column with two files, one column with one file and one empty column.
The customer would prefer it if it would fill the first row first and then the second one. And if there are more than six files they would like to just switch to the “next page” of six.

I don’t think this is possible with the standard asset grid. So I thought that maybe this could be solved by packing six files into a group. And then filling the asset grid with these groups. I am wondering how I would fill this construct.

Any ideas?

2 Likes

My Man send me a PM I can help you.

1 Like

Hi @maximilian.berthold,

Without seeing your experience, can you try to set your asset grid as vertical with 3 columns? It should do what you’re looking for.

2 Likes

Hi @Seb ,

not really. Setting the grid to 3 columns by two rows would make it scroll row by row.
Also the scrolling direction would be vertical.

We would like to scroll sets of six (or one screen) in the horizontal.

Have you tried putting a group with 6 documents inside of an Asset Grid? like this?

Then you can have six in a row then set either if you want it in a vertical or horizontal.

Let me know if that works.

@maximilian.berthold

Please see the attached video.

Should this be sufficient?

that is basically what I am looking for. the problem is that I don’t know how many documents I will have beforehand.
the documents are loaded via an Interface Asset so there might be 5 or 12 or…
so I might need different numbers of the “inner” collection depending on how many documents there are

Can you post a screenshot / mock-up of what you’re trying to achieve ?
In @Louie_Smith’s example, I see

  • An asset grid of groups. By nature of the asset grid, each group will need to have the same size
  • Groups have N documents. Again, by nature of asset grid, each group will have same number of docs
  • but in the end, you have a single flat list of NxP documents (P = number of groups)

So if this is the visual you want, why don’t you have just one list of documents in your IA?
I’m sure I’m missing something here, and a visual example would help :wink:

1 Like

Maybe I am the one missing something…

I completely agree with the first part of your message:
All groups must be the same size N.
The number of groups is P.
The Number of documents is D.
N*P = D
The problem is D is variable! (And it will change during runtime!) Therefore P must be variable!
The documents come in one single list of variable length!

Maybe this is me not seeing the forrest for the trees… But I don’t see a way to fill the groups from that list. I can see how I would make a single asset grid from that long list but not how I would fill groups inside the asset grid.

One simple example:
N = 6.
If the list has 6 or fewer members it is relatively easy. I can fill the group and end up with an asset grid with only 1 group in it.
But if I have more than 6 documents (D>6) I would need a logic to create a new group inside the asset grid and start filling it.
While making shure that the second group gets filled with the 7th (N+1) document in the list and so on…

And I do not see a way I can do that dynamically.
But your suggestion to “just have one list of documents” makes me think I am missing something.