Multi router as instagram

Hi,

I would like my navigation to be “instagram” like. That is:

having several tabs each one with it’s own navigation. The problem i’m facing:

  • In the home page (first tab) you can click on an user to navigate to that user page (and keep navigating)

  • In your profile page (last tab) you can click on an user to navigate to that user page (and keep navigating)

Both navigations are stored separately.

How can i do that in fuse? (if possible)

the problem i can’t solve is that if i create a “userProfile” page it has to depend on one router so when i keep navigating i can router.push(…).

Is there any solution other than duplicating the userProfile page each one with it’s own router?

At the moment, to get a unique history per user you will have no choice but to create multiple navigators, or routers. IF you just want to be at the most revent page in the user section then simply a different navigator per-user will work. If you really need independent histories then you will need multiple routers (this would be an unusual use-case though, to have independent histories).

You could instead remember the last sub-page to the user group and use that in further navigation back to that user. But I’ll admit this likely isn’t easy to setup. I believe we have a kind of state feature planned which would make this easier though.

I will add a feature request. It certainly seems like a good idea, at least performance-wise, to be able to have all these sub-pages shared and only have a virtual distinction for navigation.

Hi,

another router question:

I would like the first page on my router to be static so i do something like:

        <Page ux:Name="Home">
			<Router ux:Name="routerHome"/>
            <Navigator>
            	<Panel>
					<!-- news feeds  no template here -->
				</Panel>
				<ProfilePage ux:Template="profilePage" router="routerHome" />
                <WhateverPage ux:Template="whateverPage" router="routerHome" />
			</Navigator>

that works. First it shows the news feeds and then i can router.push(“profilePage”) and keep navigating.

if i router.goBack() it will go back to the previous page on the router
but: what if i want a button that goes back to the news feeds? (so removing all the navigation back to the static page)

is that possible?

Make the first page an ux:Template aswell and set <Navigator DefaultTemplate="..." />

Hi!

i don’t want the page to be a template as i need it to be created before it is instanciated. After 0.29 it’s possible to do this just creating the page inside the router like:

     <Page Name="myNonTemplatePage">

The replacement for DefaultTemplate is DefaultPath now. It works on both templates and non-templates. Use the name of the non-template as the path.

What i meant is that the question was “answered” with 0.29 (when i posted the question non-templates pages where not up :slight_smile: )