Problem on creating module to display articles from blog : 'module' is disabled in this context

Hi,
I want to create a module to display a list of article from blog. I want to display: Image + title + summary, but I get error:
DisabledException: ‘module’ is disabled in this context
Here is the code:
```
<div class=“blog-list”>
{% set rec_posts = blog_recent_posts(“default”, 3) %}
{% for rec_post in rec_posts %}
<div class=“blog-list-item”>
<img src=“{{ rec_post.featured_image }}” alt=“{{ rec_post.featured_image_alt_text }}” />
<div class=“blog-list-item-title”>{{ rec_post.name }}</div>
<div class=“blog-list-item-summary”>{{ rec_post.meta.post_summary }}</div>
</div>
{% endfor %}
</div>
```

Hi @JWickowski

Is that all the code you have in the module? Because what you shared here would not cause that type of error.

Also, you want to use {{ rec_post.post_summary }} instead of {{ rec_post.meta.post_summary }}

Hi @JWickowski

The error “DisabledException: ‘module’ is disabled in this context” occurs because the blog_recent_posts HubL function is likely intended for use within a HubSpot module, not directly in a template.
Develop a custom module that utilizes the blog_recent_posts function to retrieve recent blog posts and format the list with images, titles, and summaries.

I have attached a link for your reference (CLICK HERE)

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!

Hi,
I am creatting a module and I have a problem with

<div class=“blog-list-item-summary”>{{ rec_post.meta_description }}</div>