PortalLayout Addon: Persistent portal layouts?

Is it possible to save the last used portal layout and then reload the same layout later on?

Yes, but you have to code it yourself. :slight_smile:

Any tips on how to do It? Do I just need to store the index of the components and then add them back in the same order?

I load them always in the same order, but I set the position when adding via PortalLayout.addComponent(component, position).

O, I’ m not sure you understood what I meant then. I was talking about being able to move the components around within the layout to wherever the user would like and then when they log out and log back in and go to the screen it will have the layout the way they left it.

I did understood what your writing and I’ve nearly the same requirements as you.

In order to help you, I need to know what is exactly your problem? If you code your requirements you wil probably get a similar functionality as mine :slight_smile: But there’s no out-of-the-box solution that you simply have to switch on.

I see what your saying now. I am trying to do it a similar way now, did you just iterate through the components to get their index and then compare based off the components in order to figure out which layout goes where?

My plan.

Iterate through Layouts, get component indexes, match them with captions, save to file.

Load from file, get components based on captions, moved them to the stored index.

Looks good to me. I identify the components by type since they are unique.

[b]

[/b][i]

[/i][s]

[/s]