Identifying the latest page by path

(Charles Walter) #1

Hi. Back in May, someone provided the below code to help detect if the user was on the categories home screen. It has allowed me to display a custom header that only showed on the categories screen. However, I’d like to see if I can do something similar for the latest screen. (changing discovery-categories to discovery-latest did not do the trick). I’m assuming the latest screen can be identified with another path?

<script>var __route = require('discourse/routes/discovery-categories').default;
        activate: function() {
        deactivate: function() {

(OG) #2

Route you want to use is built dynamically.

You can use Ember Inspector to find correct route… In your case it is DiscoverLatestRoute