# How to print code from .html in a custom module

**URL:** <https://community.hubspot.com/t/how-to-print-code-from-html-in-a-custom-module/59436>\
**Category:** CMS Development\
**Tags:** design-manager, local-development, html\
**Created:** [June 21, 2022, 11:58am UTC](https://community.hubspot.com/t/how-to-print-code-from-html-in-a-custom-module/59436 "2022-06-21T11:58:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amit\_95](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/amit_95/32/74736_2.png) [@Amit\_95](https://community.hubspot.com/u/Amit_95)\
**Post date:** [June 21, 2022, 11:58am UTC](https://community.hubspot.com/t/how-to-print-code-from-html-in-a-custom-module/59436/1 "2022-06-21T11:58:33Z")

</div>

I have a module which contains a “file” field type. This field type has the field name of “_svg\_file_”

In the file manager, I have a file called “homepage-graphic.html”. This HTML file contains the code for an SVG graphic.

The reason I have not uploaded a .svg file to the file manager is because I would then need to wrap that in an \<img\> tag, whereas I want the raw SVG code to be printed in my module.

When I run {{ module.svg\_file }}, it prints:

[https://XXXXXXX.fs1.hubspotusercontent-na1.net/hubfs/XXXXXXX/website/homepage-graphic.html](https://XXXXXXX.fs1.hubspotusercontent-na1.net/hubfs/XXXXXXX/website/homepage-graphic.html)

In HubL, how can I get it to print the contents of the above file, rather than reference its file URL? How can I get it to print the SVG code inside of that file?

---

<div class="post-metadata">

**Author:** ![GregSamsa](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gregsamsa/32/18373_2.png) [@GregSamsa](https://community.hubspot.com/u/GregSamsa)\
**Post date:** [June 22, 2022, 9:32am UTC](https://community.hubspot.com/t/how-to-print-code-from-html-in-a-custom-module/59436/2 "2022-06-22T09:32:00Z")

</div>

Hi Amit\_95

I had a similar problem to yours a while back.

I needed to add an svg file in code to a page. I just made a new module in the design manager and pasted the svg code in the module.html part, then added the module to the page.

So: \<svg id=“my-svg” …\>\</svg\> and then style it in the css part of the design manager.
