Custom Fields No Longer Appear Under 'Modules' On Blog Posts

SOLVE
New Contributor

I am building a new blog post template with the latest design manager. I have added several custom fields for testing and they do not appear in the 'modules' list in the sidebar as they did in the past. 

 

I am using the following Hubl to create a field:

{% choice "resource_type" label='Choose the type of resource', choices='Case Study, Webinar, Data Sheet, E-Book', export_to_template_context=True %}

 

I have followed HS design documentation and community posts:

https://designers.hubspot.com/docs/hubl/export-to-template-context

 

https://community.hubspot.com/t5/Content-Design-Questions/Accessing-custom-text-field-in-my-HubSpot-...

https://community.hubspot.com/t5/Content-Design-Questions/Adding-custom-fields-to-blog-post/m-p/7758

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Regular Contributor

I see. I added the following to the "Additional <head> Markup" box of the Main blog template:

{% image "company_logo" label='Company Logo', export_to_template_context=True %}

And put the call for the image in the Post Listing template:

{% if content.widgets.company_logo.body.src %}
<div class="logo-wrap">
<img src="{{ content.widgets.company_logo.body.src }}">
</div>
{% endif %}

 

Seems to be working as expected.

 

Reply
0 Upvotes
7 Replies 7
Esteemed Advisor

@ikonic_media,

 

Are you placing your HubL snippet in your post template? Your syntax looks right. 

- Jonathan Sumner
Reply
0 Upvotes
New Contributor

@Jsum

Yes, I am adding this to the top of my post template. 

Reply
0 Upvotes
Esteemed Advisor

Could you use vidyard or the like to share a screen cap video of the template and the result? I do not see a reason why this isn't working for you but I don't have access to the full picture.

- Jonathan Sumner
Reply
0 Upvotes
Highlighted
Regular Contributor

This is what I got from support:

Seems ridiculous!

 

"That's correct- Hubl Support Tags are no longer supported for use in the Blog Post Template. Essentially, it does render a nested module- a rich text module inside the blog content module- and this functionality has been deprecated. You can still render a static rich text module, but it won't be editable on the page level.

 

You can only add a new module to the a blog post in the template- for example, dragging an image module into the template itself- and not to the blog content module."

Reply
0 Upvotes
New Contributor

I confirmed with HubSpot support that we can no longer create custom fields on blog post templates using the 'export-to-template-context' documentation. Here is the full response from HS support:

 

"I can confirm that Hubl is no longer supported for blog post templates. Technically its like nesting a module within a module which is no longer allowed in the new Design Manager. What I might recommend trying is moving the code to the head HTML of the templates so it doesn't affect other posts like it, since creating a brand new custom module and removing that field entirely would end up messing with all data associated with that field being lost."

Reply
0 Upvotes
Regular Contributor

I see. I added the following to the "Additional <head> Markup" box of the Main blog template:

{% image "company_logo" label='Company Logo', export_to_template_context=True %}

And put the call for the image in the Post Listing template:

{% if content.widgets.company_logo.body.src %}
<div class="logo-wrap">
<img src="{{ content.widgets.company_logo.body.src }}">
</div>
{% endif %}

 

Seems to be working as expected.

 

Reply
0 Upvotes
New Contributor

The key here was moving the custom field Hubl out of the "Blog Content" template and into the "Additional <head> Markup" field which is available on the drag-and-drop template interface when no other module or group is selected. 

Reply
0 Upvotes