# Cab't create a Router with Custom Pages

**URL:** <https://forums.fusetools.com/t/cabt-create-a-router-with-custom-pages/2886>\
**Category:** Bug Reports\
**Created:** [March 20, 2018, 6:27am UTC](https://forums.fusetools.com/t/cabt-create-a-router-with-custom-pages/2886 "2018-03-20T06:27:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![girr.benjamin](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/girr.benjamin/32/210_2.png) [@girr.benjamin](https://forums.fusetools.com/u/girr.benjamin)\
**Post date:** [March 20, 2018, 6:27am UTC](https://forums.fusetools.com/t/cabt-create-a-router-with-custom-pages/2886/1 "2018-03-20T06:27:29Z")

</div>

Hello everybody,  
I try to create a Multi-Page App and introduce a router, like written in the docs. First of all I introduced the router and Navigator in the MainView.ux

```auto
<App>

	<Router ux:Name="router" />

	<ux:Include File="Resources.ux" />

	<Font File="Assets/Fonts/Roboto-Regular.ttf" ux:Global="MainFont" />
	<Navigator DefaultPath="firstPage">

	<Page ux:Template="firstPage">
		<ux:Include File="content.ux" />
	</Page>

	 <Page ux:Template="StartSelection" >
		<ux:Include File="Start.ux" />	
	</Page>
		</Navigator>

</App>

```

Then I create a Page called StartPage

```auto
<DefaultPage ux:Class="StartPage">
	<Router ux:Dependency="router" />
...

```

Now building the application gives me (for me correctly) the following message:

```auto
You can instantiate the class with <StartPage /> instead.

```

Now like mentioned in the Docs I changed my MainView.ux file to:

```auto
<App>

	<Router ux:Name="router" />

	<ux:Include File="Resources.ux" />

	<Font File="Assets/Fonts/Roboto-Regular.ttf" ux:Global="MainFont" />
	<Navigator DefaultPath="firstPage">

	<Page ux:Template="firstPage">
		<ux:Include File="content.ux" />
	</Page>

	 <Page ux:Template="StartSelection" >
		<StartPage />	
	</Page>
		</Navigator>

</App>

```

But now I’m getting the following error:

```auto
MainView.ux(16,1): Error : Data type not found: StartPage/Users/bgirr/WeddingFunApp/MainView.ux(16,1): Error : Could not resolve type 'StartPage'?: Error : The given key was not present in the dictionary.

```

Has someone an idea how to fix that issue?

General informations:  
Fuse version 1.7.3 (build 15528)  
macOS

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [March 21, 2018, 7:34am UTC](https://forums.fusetools.com/t/cabt-create-a-router-with-custom-pages/2886/2 "2018-03-21T07:34:18Z")

</div>

The error `You can instantiate the class with <StartPage /> instead.` comes from a code block that you’re not showing. We won’t be able to tell what’s wrong without seeing a complete reproduction.

Other than that, your general approach seems to be okay, except that the `StartPage` instance in your `Navigator` also needs a `ux:Template` property, so you can navigate to it.
