# help with using module\_block

**URL:** <https://community.hubspot.com/t/help-with-using-module-block/70184>\
**Category:** CMS Development\
**Created:** [November 29, 2022, 6:29pm UTC](https://community.hubspot.com/t/help-with-using-module-block/70184 "2022-11-29T18:29:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KajBob](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@KajBob](https://community.hubspot.com/u/KajBob)\
**Post date:** [November 29, 2022, 6:29pm UTC](https://community.hubspot.com/t/help-with-using-module-block/70184/1 "2022-11-29T18:29:37Z")

</div>

I tried looking for references in the docs but this is all I could find about it, no other documentation, no explanation on the parameters.

```lia-code-sample
{% module_block module "my_rich_text_module" path="/My Rich Text Field Module",
 label="My Rich Text Field Module" 
%}
 {% module_attribute "rich_text_field_variable" %}
 <div>My HTML block</div>
 {% end_module_attribute %}
{% end_module_block %}

```

I have been using widget\_block for a while, and I tried to get this new module\_block to work but it wouldn’t. Is there any difference between using module\_block, versus the traditional module @hubspot/rich\_text?

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [November 29, 2022, 8:41pm UTC](https://community.hubspot.com/t/help-with-using-module-block/70184/2 "2022-11-29T20:41:22Z")

</div>

widget\_block has been deprecated and module\_block is basically just a version 2 of it. It uses the exact same code pattern as widget\_block, only major difference to keep in mind is that the _type\_of\_module_ will usually never change from _module_ whereas in widget\_block it would be things like _rich\_text_ or _raw\_html_. You can read a slightly more in depth explination on that here - [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/cms/building-blocks/modules/using-modules-in-templates#block-syntax)

The code you’ve posted is more an example of if you’re accessing a custom module. You can still access default HubSpot modules with module\_block same as you would with widget\_block. That code would look something like this:

```lia-code-sample
{% module_block module "my_rich_text_module" path="@hubspot/rich_text.module", label="Rich Text" %}
 {% module_attribute "html" %}
 <div>My HTML block</div>
 {% end_module_attribute %}
{% end_module_block %}

```

---

<div class="post-metadata">

**Author:** ![KajBob](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@KajBob](https://community.hubspot.com/u/KajBob)\
**Post date:** [November 29, 2022, 9:24pm UTC](https://community.hubspot.com/t/help-with-using-module-block/70184/3 "2022-11-29T21:24:08Z")

</div>

thanks for your help!
