CMS Development

thamada
Member

I want to get the src of the image added to the Blog template. / Blog templateに追加した画像のsrcを取得したい

SOLVE

The images are arranged in this way.

 

I am changing the image for each blog post. Is there any way to get the src of this module?

 

<div class="blog-post__hero-image-wrapper">
{%
module 'hero_image'
path='@hubspot/linked_image'
src='https://static.hubspot.com/final/img/content/email-template-images/placeholder_200x200.png'
%}
</div>

 

I tried writing it this way, but could not get it

 

{{module.hero_image.src}}

{{hero_image.src}}

{{hero_image}}

0 Upvotes
1 Accepted solution
thamada
Solution
Member

I want to get the src of the image added to the Blog template. / Blog templateに追加した画像のsrcを取得したい

SOLVE

I solved the problem with the help of this post.

https://community.hubspot.com/t5/CMS-Development/Adding-a-custom-value-from-a-blog-post-template-to-...

 

I was able to get the src of the image item added with custom with the following description

{{content.widgets.hero_image.body.img.src}}

 

Check the attributes of hero_image and specify body.img.src with the following statement

{{content.widgets.hero_image}}

 

View solution in original post

0 Upvotes
1 Reply 1
thamada
Solution
Member

I want to get the src of the image added to the Blog template. / Blog templateに追加した画像のsrcを取得したい

SOLVE

I solved the problem with the help of this post.

https://community.hubspot.com/t5/CMS-Development/Adding-a-custom-value-from-a-blog-post-template-to-...

 

I was able to get the src of the image item added with custom with the following description

{{content.widgets.hero_image.body.img.src}}

 

Check the attributes of hero_image and specify body.img.src with the following statement

{{content.widgets.hero_image}}

 

0 Upvotes