CMS Development

alexdevhouse
Participant | Elite Partner
Participant | Elite Partner

Setting custom module's default value on Blog Posts

Hi everyone,

 

I am having some trouble with setting custom values inside of blog posts, when using a custom module.

 

I've created a simple module with a radio choice field, with the follow choices & values:

Featured : 1

Not featured : 2 (default selection)

 

It seems that even though a new blog post is created and published, that the data from this custom module is not actually available. The value for my custom module is not available for a post unless I manually change my radio selection and click on the "Can't see your updates? Click here" text. 

 

I have confirmed this by using the HubSpot blog post API. The data is not available within the "widgets" content for a particular post until I have clicked on the "Can't see your updates? Click here" popup, only after I have changed the radio select inside of the module.

 

Some background:
I am using:

 

{% for content in contents|sort(false, false, 'widgets.[my module ID].body.featured_story') %}

 

to sort my listing page content depending on the values from my custom module. If one of our content editors creates a new blog post without manually forcing the default value of my custom module to be set/updated, then the listing page breaks because there is a post without a sort value.

 

I hope this makes sense - thanks in advance!

0 Upvotes
2 Replies 2
Jaycee_Lewis
Community Manager
Community Manager

Setting custom module's default value on Blog Posts

Hi, @alexdevhouse Thanks for including those details 🙌.

 

Let's see if we can get this conversation kicked off by tagging a few community members – hey @mangelet @rohansdeeson @tette_engage do you have any experience here?

 

Thank you!  – Jaycee

 

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

alexdevhouse
Participant | Elite Partner
Participant | Elite Partner

Setting custom module's default value on Blog Posts

Thanks for the assistance, Jaycee!

0 Upvotes