alanost  
                
                  
                    July 27, 2022,  8:56pm
                   
                  1 
               
             
            
              Hello,
the user is logged in 
only on the home page, so URL “/” 
 
<script type="text/x-handlebars" data-template-name="/connectors/below-site-header/custom-homepage">
  <div style="height: 200px; width: 200px;background: red"></div>
</script>
 
            
              
            
           
          
            
              
                th21  
              
                  
                    July 27, 2022, 10:16pm
                   
                  2 
               
             
            
              
  
  
    
      import Component from "@ember/component";
import discourseComputed from "discourse-common/utils/decorators";
import { inject as service } from "@ember/service";
export default Component.extend({
  router: service(),
  @discourseComputed("currentUser")
  shouldShow(currentUser) {
    const isStaff = currentUser && currentUser.staff;
    const lowTrustLevel = currentUser && currentUser.trust_level < 2;
    // show banner only for anons and < TL 2
    return !isStaff && (!currentUser || lowTrustLevel);
  },
  @discourseComputed("router.currentRouteName", "router.currentURL")
  discoveryRoute(currentRouteName, currentURL) {
    return currentRouteName.indexOf("discovery") > -1;
  },
});
 
  
    
    
  
  
 
You can take a look at how meta banner works, it supports conditional login state and path.
             
            
              3 Likes 
            
            
           
          
            
              
                alanost  
              
                  
                    July 28, 2022,  9:21am
                   
                  3 
               
             
            
              Thank you, that helped me a lot
             
            
              1 Like