Any way to copy as hubl when the previous developer used an empty widget container/flexible column

They’ve used it for the basis of every page :angry:

Client wants new templates based on current page layouts, content replicated off site for demoing, etc.

I’m not sure why anyone would use this as the basis of their theme in 2024


Barry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

Hi @BarryGrennan

Yes. First, you need to open that page in the content editor and then add “?developerMode=true” in the URL. Now when you hover over the sections you will see a dropdown icon, click on that and you will find the option to ''Copy as HubL". Here is the doc explaining it in detail.

https://community.hubspot.com/t5/Releases-and-Updates/Copy-as-HubL-Functionality-for-Sections-on-Pages/ba-p/566419

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!

Hi @GRajput,

thanks for the reply.

To clarify, I’m familiar with developer mode. However, their templates don’t use the standard dnd areas, etc. rather they have a single widget area

{% widget_container "flexible_column" label="Flexible Column" %}{% end_widget_container %}

The contents of which is not copiable via the standard method you point out.


Barry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

Hi @BarryGrennan

Okay so I would recommend that you change the layout and use dnd_areas then please do that as it’s based on the old layout which is not recommended. But if you can’t change the layout then the only way is to write the HubL from scratch. If you wanna know more about flexible columns then this doc will help.

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!

Hey @BarryGrennan,

this sounds like a nightmare… I feel sorry for you!

One thing you should try is converting existing templates to themes and ask the previous devs why on earth they’ve did it how they’ve did it…

best,

Anton

@Anton, I know, right? And it was developed in the last year by a big agency.
That existing templates to themes link is useful though, cheers for that.
I’m hoping I can avoid needing to do that for the whole site, ubt we’ll see. :joy:


Barry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

You’re welcome @BarryGrennan!
Let’s hope a rebuild can be avoided but if it should come to rebuilding - I could support/help you with that

cheers