# How to move the topic-map widget so it appears above the post's content

**URL:** https://meta.discourse.org/t/how-to-move-the-topic-map-widget-so-it-appears-above-the-posts-content/42029
**Category:** Development
**Created:** [4월 4, 2016, 9:59오후 UTC](https://meta.discourse.org/t/how-to-move-the-topic-map-widget-so-it-appears-above-the-posts-content/42029 "2016-04-04T21:59:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)
#### Post date: [4월 4, 2016, 9:59오후 UTC](https://meta.discourse.org/t/how-to-move-the-topic-map-widget-so-it-appears-above-the-posts-content/42029/1 "2016-04-04T21:59:19Z")

</div>

Looking to alter `topic-map` but cannot find it in either the `post.hbs` or `topic.hbs`. I have tried altering the component template via discourse/templates/components/topic-map.hbs but it does nothing. Perhaps it is because `topic-map` is a widget now? In which case, where is the widget called?

Ultimately I will be planning on repositioning `topic-map` to be on top of the post rather than underneath it.

---

<div class="post-metadata">

### Author: ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)
#### Post date: [4월 4, 2016, 11:34오후 UTC](https://meta.discourse.org/t/how-to-move-the-topic-map-widget-so-it-appears-above-the-posts-content/42029/2 "2016-04-04T23:34:07Z")

</div>

I have more or less figured out what I needed to know. Here is what I’ve found for anyone else interested.

Although in the Discourse repo there is still a `topic-map` component, it doesn’t seem to be called. However, the `topic-map` widget is very much present is called in the `post` widget.

In my plugin, I have created the path `discourse/widgets/post.js.es6` and copied the contents of the file matching this path from the Discourse repo. Then look for this line hereL `result.push(this.attach('topic-map', attrs));` and change `push` to `unshift`. This will bring the `topic-map` to above the post content.

However, `unshift` brings it to the front of the array, even above details like date posted and the poster’s username. So if you use: `result.splice(1, 0, (this.attach('topic-map', attrs)));` then it will place the `topic-map` in a desirable position.

 ![](https://global.discourse-cdn.com/meta/original/3X/0/9/09b679141254ea3f71c272e2237d3e80f8abd60a.png)
