# Trouble getting a top level page to Ember

**URL:** <https://meta.discourse.org/t/trouble-getting-a-top-level-page-to-ember/56007>\
**Category:** Development\
**Created:** [January 19, 2017, 6:11am UTC](https://meta.discourse.org/t/trouble-getting-a-top-level-page-to-ember/56007 "2017-01-19T06:11:45Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)\
**Post date:** [January 25, 2017, 2:08pm UTC](https://meta.discourse.org/t/trouble-getting-a-top-level-page-to-ember/56007/7 "2017-01-25T14:08:46Z")

</div>

This has come up in a number of places so I decided to give it a go. I played around with it this morning. Try this:

[https://github.com/Mittineague/discourse-newpage/pull/1](https://github.com/Mittineague/discourse-newpage/pull/1)

Edit:  
I have a little more time now to explain. 😉

The main difference I made was to change the route map. I could see that the route map code (`discourse-newpage-route-map.js.es6`) was running but the route code itself (`/routes/newpage/index.js.es6`) wasn’t. Looking at some of my other plugins (not yet public) I realized I normally use this pattern for page routes: `/routes/newpage-index.js.es6` But that still didn’t solve everything.

So I suspected the Ruby routing as an issue since I couldn’t get a `byebug` to show me that the controller was firing. So I effectively recreated the entire routing and engine set up to follow my normal pattern. Calling `/newpage.json` worked so I figured that end was correct. But something was off with directing the route through the engine so I assigned the route to Discourse itself instead.

I can’t say that anything in particular was the magic bullet but the combination of renaming pieces on the Ember side and reconfiguring the Ruby side made it all work out.

---

_[View the full topic](https://meta.discourse.org/t/trouble-getting-a-top-level-page-to-ember/56007)._
