@sevenmaxis (megas) posted a new topic, subject "Ember template convention". It read:

   I'm trying to understand EmberJS template convention in Discourse.  
    Here's a snippet from `app/assets/javascripts/discourse/templates/discovery/categories.hbs`
    [code] 
        {{#discovery-categories refresh="refresh"}}
          {{component controller.categoryPageStyle
                      categories=model.categories
                      latestTopicOnly=controller.latestTopicOnly
                      topics=model.topics}}
          {{!-- my-template --}}
        {{/discovery-categories}}
        
    [/code]
    
    What is the meaning of `discovery-categories` and `component`?  
    For example I want to insert `my-template` to extend `categories.hbs`, what is the convention I should use to create file with template?

Then @zogstrip (Régis Hanol) said

    sevenmaxis:
    
    > What is the meaning of `discovery-categories` and `component`?
    
    `discovery-categories` is this component. It's used to display categories in the home pages.
    
    `component` is an Ember helper which allows to insert components **dynamically**

To which @sevenmaxis (megas) replied

    Could you explain more explicitly? What is the block style {{#d}}…{{/d}}?

To which @zogstrip (Régis Hanol) replied

    That's the block syntax in handlebars.
    
    I suggest you go through the handlebars doc and the Ember Guides to learn more.


{'source': 'discourse', 'url': 'https://meta.discourse.org/t/ember-template-convention/51954', 'title': 'Ember template convention', 'views': 646, 'has_accepted_answer': False, 'word_count': 188, 'like_count': 5, 'reply_count': 2, 'participant_count': 2, 'posts': 4, 'tags': '', 'author': '@sevenmaxis (megas)', 'participants': '@sevenmaxis (megas), @zogstrip (Régis Hanol)', 'image_url': [None], 'created_at': '2016-10-24T12:16:09.010Z', 'last_posted_at': '2016-10-24T14:16:40.016Z'}