# Changing Background Hero Image in coded file

**URL:** <https://community.hubspot.com/t/changing-background-hero-image-in-coded-file/8136>\
**Category:** CMS Development\
**Created:** [March 14, 2018, 9:58pm UTC](https://community.hubspot.com/t/changing-background-hero-image-in-coded-file/8136 "2018-03-14T21:58:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielps02](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danielps02/32/94553_2.png) [@danielps02](https://community.hubspot.com/u/danielps02)\
**Post date:** [March 14, 2018, 9:58pm UTC](https://community.hubspot.com/t/changing-background-hero-image-in-coded-file/8136/1 "2018-03-14T21:58:21Z")

</div>

Hello everyone,  
I’m trying to make a customizable header area composed of a background image and h1 and h2 tags plus a button in a Hubspot coded file (not in template builder). The problem is that I want to make the background image customizable through an image module as well as the header tags and the button. I haven’t find the way to do it at this point. I found an article in reference to this but it was not so helpful for me. [Accounts Dashboard | HubSpot](https://designers.hubspot.com/docs/hubl/export-to-template-context)

Here is the template I’m building for your reference: [https://preview.hs-sites.com/\_hcms/preview/template/multi?portalId=410209&tc\_deviceCategory=desktop&domain=default&template\_file\_path=Custom%2Fpage%2FDP-CALA-TEST%2Findex.html](https://preview.hs-sites.com/_hcms/preview/template/multi?portalId=410209&tc_deviceCategory=desktop&domain=default&template_file_path=Custom%2Fpage%2FDP-CALA-TEST%2Findex.html)  
(Take a look at the top header image and text).

Any help is appreciated.  
Thanks,  
Daniel

---

<div class="post-metadata">

**Author:** ![roisinkirby](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@roisinkirby](https://community.hubspot.com/u/roisinkirby)\
**Post date:** [April 5, 2018, 1:36pm UTC](https://community.hubspot.com/t/changing-background-hero-image-in-coded-file/8136/2 "2018-04-05T13:36:30Z")

</div>

Hey @danielps02 I wasn’t able to access the template via that link - are you still working on this page?

---

<div class="post-metadata">

**Author:** ![danielps02](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danielps02/32/94553_2.png) [@danielps02](https://community.hubspot.com/u/danielps02)\
**Post date:** [April 5, 2018, 2:12pm UTC](https://community.hubspot.com/t/changing-background-hero-image-in-coded-file/8136/3 "2018-04-05T14:12:33Z")

</div>

Hi @roisinkirby

Thank you for looking into this. I’ve finally solved it by creating a custom module and placing the divs in different positions (not one inside another). It was also easier for me to build the template in the template builder instead of a coded file in html. Here’s the result:

[https://preview.hs-sites.com/\_hcms/preview/template/multi?is\_buffered\_template\_layout=true&portalId=410209&tc\_deviceCategory=desktop&template\_layout\_id=5644924911](https://preview.hs-sites.com/_hcms/preview/template/multi?is_buffered_template_layout=true&portalId=410209&tc_deviceCategory=desktop&template_layout_id=5644924911)

Now I’m facing another challenge: I’ve created a custom module with a choice fields for users to choose a number of elements to be rendered in the page (in this case I have 2 pages with this type of custom module: 1) Choice for # of speakers 2) Choice for # of question for FAQ section). The problem is that when a number is choose I’m not able to edit each of the modules within this custom module from the content editor.

Here are the examples:

Speakers Template: [https://preview.hs-sites.com/\_hcms/preview/template/multi?is\_buffered\_template\_layout=true&portalId=410209&tc\_deviceCategory=desktop&template\_layout\_id=5655577099](https://preview.hs-sites.com/_hcms/preview/template/multi?is_buffered_template_layout=true&portalId=410209&tc_deviceCategory=desktop&template_layout_id=5655577099) (the default is 1 speaker element, then you have the option to choose a total of 6)

FAQ Template: [https://preview.hs-sites.com/\_hcms/preview/template/multi?is\_buffered\_template\_layout=true&portalId=410209&tc\_deviceCategory=desktop&template\_layout\_id=5656290470](https://preview.hs-sites.com/_hcms/preview/template/multi?is_buffered_template_layout=true&portalId=410209&tc_deviceCategory=desktop&template_layout_id=5656290470) (same as the above you but in this case you have the option to choose a maximun of 10 questions and answers)

If you would have an idea of how to solve this problem in the content editor that would be great.

Thanks in advance,

Daniel

---

<div class="post-metadata">

**Author:** ![danielps02](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danielps02/32/94553_2.png) [@danielps02](https://community.hubspot.com/u/danielps02)\
**Post date:** [April 6, 2018, 9:35pm UTC](https://community.hubspot.com/t/changing-background-hero-image-in-coded-file/8136/4 "2018-04-06T21:35:53Z")

</div>

Hi @roisinkirby

I finally found the issue: It was a simple line of code that needed to be fixed and wrong placing of some closing tags. Now it’s working as desired.

Thank you,

Daniel
