# Customize Blog Content Object

**URL:** <https://community.hubspot.com/t/customize-blog-content-object/74899>\
**Category:** CMS Development\
**Created:** [February 9, 2023, 9:23pm UTC](https://community.hubspot.com/t/customize-blog-content-object/74899 "2023-02-09T21:23:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EJacobson](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EJacobson](https://community.hubspot.com/u/EJacobson)\
**Post date:** [February 9, 2023, 9:23pm UTC](https://community.hubspot.com/t/customize-blog-content-object/74899/1 "2023-02-09T21:23:08Z")

</div>

Hi,

I am trying to create a blog listing that has both a title and a subtitle. As far as I can see, the content object of the blog post has a title and a post body, author information, tags. Is there a way to add more fields that can then be accessed when iterating through the contents in the blog listing page as well? Also, is there any documentation that details all of the properties that are available in the content object?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [February 10, 2023, 10:09am UTC](https://community.hubspot.com/t/customize-blog-content-object/74899/2 "2023-02-10T10:09:43Z")

</div>

Hi @EJacobson,

yes - you can enhance the blog, template(s), hero, header, content what ever you like/need with so called custom modules.

Here are some resources for developing custom modules

- [Starting with Hubl](https://developers.hubspot.com/docs/cms/hubl)(the programming language of HubSpot)
- [Starting with custom module development](https://developers.hubspot.com/docs/cms/building-blocks/modules/files)
- [a good collection of possible blog variables](https://developers.hubspot.com/docs/cms/hubl/variables#blog-variables) & [variables that work in every template type](https://developers.hubspot.com/docs/cms/hubl/variables#variables-available-in-all-templates)
- [functions](https://developers.hubspot.com/docs/cms/hubl/functions)

Also I recommend you to create a [free cms developer account](https://app.hubspot.com/signup-hubspot/cms-developers) and if you never worked with Hubl or developed anything in HubSpot → [CMS for developers certification](https://academy.hubspot.com/courses/cms-for-developers)

My personal approach is always to create custom module and drop it in the template. If the user should not use it disable it for further useage - it will still work in the places you’re implementing it

**important note: You can’t use modules inside modules**

- - -

a basic custom listing module could look something like this

```lia-code-sample
{% for content in contents %}
<figure class="card">
<img src="{{ content.featured_image }}" alt="{{ content.featured_image_alt_text }}" class="featuredImage">
<figcaption>
<h3>{{ content.name }}</h3>
<p class="summary">{{ content.post_body|striptags|truncatehtml(160,"...", true) }}
<a href="{{ content.absolute_url }}" class="readMore">read more</a>
</figcaption>
</figure>
{% endfor %}

```

But you don’t rely on the build-in loop “for content in contents” if you want more options or have a specific usecase you can use functions like [blog\_recent\_posts](https://developers.hubspot.com/docs/cms/hubl/functions#blog-recent-posts) to create your own custom listing. The module would look something like this:

```lia-code-sample
{% set rec_posts = blog_recent_posts("default", 5) %}

{% for content in rec_posts %}
<figure class="card">
<img src="{{ content.featured_image }}" alt="{{ content.featured_image_alt_text }}" class="featuredImage">
<figcaption>
<h3>{{ content.name }}</h3>
<p class="summary">{{ content.post_body|striptags|truncatehtml(160,"...", true) }}
<a href="{{ content.absolute_url }}" class="readMore">read more</a>
</figcaption>
</figure>
{% endfor %}

```

what’s left is a bit of CSS to style it.

best,

Anton

---

<div class="post-metadata">

**Author:** ![EJacobson](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EJacobson](https://community.hubspot.com/u/EJacobson)\
**Post date:** [February 10, 2023, 2:43pm UTC](https://community.hubspot.com/t/customize-blog-content-object/74899/3 "2023-02-10T14:43:08Z")

</div>

Hi, I’m sorry if my question wasn’t clear. I know how to add custom modules to a template. My question is that I want to access a property of my custom blog post module, in my custom blog listing module. So that if I want to display something in my blog listing other than the featured image, name, post body, and absolute url, I should be able to do that. For instance, another piece of text, such as a subtitle, or a second image. Can I enable the user to set another property on the blog post, and then access that property on the blog listing?
