Consider there are two authenticated WeChat mini-programs. Can I open a mini program on top of another mini program using an iframe?- Not using navigateToMiniProgram API but I am asking like embedding one on top of another.
I have searched the documentation and a few other blogs/white papers. I was not able to find anything relevant to it.
As far as I know, it is not possible to embed a wechat page inside another.
The best way I found to simulate this behavior was to create a component with the elements that I need to embed so that I can use it anywhere.
Suppose you have a login page that you can show if you go to the login page as such or you want to have a sidebar in case the user has not logged in.
You create a component with the login (I'm going to put a pseudo code, now I don't remember the wechat syntax well)
Then in your page where you want to embed said component you just add the component.
I hope this helps you