# Extracting HTML+HubL for Template Creation

**URL:** <https://community.hubspot.com/t/extracting-html-hubl-for-template-creation/102818>\
**Category:** CMS Development\
**Tags:** hubdb, local-development, html, professional\
**Created:** [March 18, 2024, 3:25pm UTC](https://community.hubspot.com/t/extracting-html-hubl-for-template-creation/102818 "2024-03-18T15:25:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Levi\_STA](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@Levi\_STA](https://community.hubspot.com/u/Levi_STA)\
**Post date:** [March 18, 2024, 3:25pm UTC](https://community.hubspot.com/t/extracting-html-hubl-for-template-creation/102818/1 "2024-03-18T15:25:25Z")

</div>

Hi there,

Our goal is to extract the HTML and HubL code from an existing page to use it as a foundational template. This template will enable us to dynamically generate pages, automating the inclusion of data from our HubDB tables into each new page. This approach is essential for us as it eliminates the need for manually creating separate pages, which, although similar in appearance, contain different data sets.

We envision this template as a cornerstone for efficiently managing dynamic content, significantly reducing repetitive tasks, and enhancing our overall site maintenance.

If anyone has experience or insights on how to effectively accomplish this. Particularly the initial step of extracting HTML+HubL code to create a reusable template, I would greatly appreciate your guidance.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [March 18, 2024, 5:28pm UTC](https://community.hubspot.com/t/extracting-html-hubl-for-template-creation/102818/2 "2024-03-18T17:28:12Z")

</div>

Hi [@Levi\_STA](https://community.hubspot.com/t5/user/viewprofilepage/user-id/717826)

You can extract HTML + HubL from a page, though you would need to do this by section (instead of entire page at once).

HubSpot has documentation on how to achieve this here:

> **[Sections - HubSpot docs](https://developers.hubspot.com/docs/cms/start-building/building-blocks/sections/sections)**
>
> Sections are the outermost child element of a dnd\_area. Sections can be made reusable through section templates or saving them within the page editor.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Levi\_STA](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@Levi\_STA](https://community.hubspot.com/u/Levi_STA)\
**Post date:** [March 19, 2024, 2:54pm UTC](https://community.hubspot.com/t/extracting-html-hubl-for-template-creation/102818/3 "2024-03-19T14:54:57Z")

</div>

Hi @evaldas,  
I appreciate the quick response!  
Alright, well if that’s all there is then we’ll have to go for it haha.  
It’s kinda the same, just some extra steps.

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [March 19, 2024, 3:20pm UTC](https://community.hubspot.com/t/extracting-html-hubl-for-template-creation/102818/4 "2024-03-19T15:20:11Z")

</div>

Sure thing! Depending on the page setup or theme, sometimes it may be possible to drop all the modules into one big section and then copy all of that - but, at the end of the day, it would probably be similar amount of clicks.

I personally even prefer copying by section as it makes it more digestible 🙂
