# Block form component

**URL:** https://meta.discourse.org/t/block-form-component/53399
**Category:** Development
**Created:** [26 Novembre 2016, 3:18pm UTC](https://meta.discourse.org/t/block-form-component/53399 "2016-11-26T15:18:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jamesmarkcook](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesmarkcook/32/168563_2.png) [@jamesmarkcook](https://meta.discourse.org/u/jamesmarkcook)
#### Post date: [26 Novembre 2016, 3:18pm UTC](https://meta.discourse.org/t/block-form-component/53399/1 "2016-11-26T15:18:13Z")

</div>

I’m attempting my first plugin and have come across this in the codebase:

```
{{#discovery-categories refresh="refresh"}}
  {{component categoryPageStyle
              categories=model.categories
              latestTopicOnly=latestTopicOnly
              topics=model.topics}}
{{/discovery-categories}}

```

I’ve done some basic Ember recently, but haven’t come across the `{{#name}}` syntax yet.

I learnt to use components like (without the hash in the name):

```
{{component-name}}

```

Does the hash/pound symbol represent anything special? Is it even a component? And why is the `categoryPageStyle` component being called with ‘component’ in front of it?

Thanks!

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [26 Novembre 2016, 3:39pm UTC](https://meta.discourse.org/t/block-form-component/53399/2 "2016-11-26T15:39:33Z")

</div>

Yes, and the `#` denotes block form (instead of inline)

> **[Wrapping Content in a Component - Components - Ember Guides](https://guides.emberjs.com/v2.5.0/components/wrapping-content-in-a-component/)**
>
> Sometimes, you may want to define a component that wraps content provided by other templates. 
> 
> For example, imagine we are building a blog-post component that we can use in our application to display a blog post: 
> 
> {{title}}

---

<div class="post-metadata">

### Author: ![jamesmarkcook](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesmarkcook/32/168563_2.png) [@jamesmarkcook](https://meta.discourse.org/u/jamesmarkcook)
#### Post date: [26 Novembre 2016, 3:41pm UTC](https://meta.discourse.org/t/block-form-component/53399/3 "2016-11-26T15:41:57Z")

</div>

Thanks for your help @cpradio

---

<div class="post-metadata">

### Author: ![jamesmarkcook](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesmarkcook/32/168563_2.png) [@jamesmarkcook](https://meta.discourse.org/u/jamesmarkcook)
#### Post date: [26 Novembre 2016, 3:53pm UTC](https://meta.discourse.org/t/block-form-component/53399/4 "2016-11-26T15:53:40Z")

</div>

I’m also assuming that components can exist without having their own template file? (As there doesn’t appear to be one for discovery-categories.)

This is something I was also unaware of!

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [26 Novembre 2016, 3:58pm UTC](https://meta.discourse.org/t/block-form-component/53399/5 "2016-11-26T15:58:10Z")

</div>

Yes, it depends how the component is built and what it is extending (if anything).

Example of using Buffered Render

> <https://github.com/cpradio/discourse-plugin-composer-help-button/blob/master/assets/javascripts/discourse/components/composer-help-content.js.es6>

Versus one that is utilizing a template

> <https://github.com/cpradio/discourse-plugin-imgflip/blob/master/assets/javascripts/discourse/components/imgflip-result.js.es6>
