Custom Module is not showing after I upload the theme.json

NShengKee
Member

Hi, I am having a issue, after I uploaded the theme.json, in the design tool page, all my custom module is not showing on the right module list, and even I remove it, the custom module is also not showing anymore, is that a bug?

0 Upvotes
6 Replies 6
NShengKee
Member

it seems like the old drag and drop template is not showing my custom module, then I tried to created a new template using HTML + HubL templates with drag and drop areas, the result is fine now. But is that something I can do for the old drag and drop template to make it show my custom module? Because the existing template already dependents to many live pages, and I dont want to convert those old template to new one.

0 Upvotes
Anton
Key Advisor | Diamond Partner

Hi @NShengKee

if you have custom modules in a (custom) theme you can clone(right-click -> clone), rename them and then move to another folder(right-click -> move to another directory/folder; not account!) by doing so you can move/use existing modules outside of a theme.

 

There are a few downsides like 

  • you'll have those modules twice(or more) in your design-manager and in the page builder
  • youl'll most likely need to copy&paste the required CSS/JS parts also which will (most likely) bloat your page
  • if you're using different frameworks like Bootstrap2, 3, 4... you'll need to rework your module
  • ...

 

So sure you can do this, but do it only if you "know" what you're up to 🙂 

 

 

best, 

Anton




check
Did my post help answer your query? Help the Community by marking it as a solution



Indra
Top Contributor | Diamond Partner

Hi @NShengKee,

 

The theme.json is a file used to create a theme. You are talking about templates. A template is a part of a theme, which you can choose from if you build a theme. 

 

A theme doesn't support drag and drop template. What you can do is convert your drag and drop template to a html template by using 'Clone to html' and use it or parts of it for building your custom theme.

 

I recommand checking some documentation about it:

Also if building a theme, it's good to check how it is setup by checking the HubSpot boilerplate.

This can be found at GitHub at: https://github.com/HubSpot/cms-theme-boilerplate 

 

One extra note: Modules created inside a theme can't be used outside of it. So if you still have seperate templates and moved all modules into the theme, the modules won't show up in the old template drag and drop sections.


Bureau Vet

Did my post solve your question? Help the community by marking it as a solution
NShengKee
Member

Hi, @Indra, thanks for your reply. So previously before I upload the theme.json, I can see all my custom modules on the design tools page. Here is the screenshot, but after I upload the theme.json, then all my custom module is disappeared on the right sidebar. Even I remove the theme.json now and reload the page, the custom module is still not showing. 

test.png

 

the clone to html is not a good solution for now, because there are a lot of pages is linked to the Master Template now, so it will be a lot of manual work to switch the template later.

0 Upvotes
Indra
Top Contributor | Diamond Partner

Hi @NShengKee,

 

So to make things clear, you didn't moved the custom modules to your theme folder? 

If you did, you won't see them inside the right panel for all modules since modules inside a theme are only available inside the theme.

If you didn't, and the custom modules are on the main folder, I recommend to ask HubSpot support (via chat) to restore specific modules. They can if you know the module name.

 

If you are going to switch from the old template to the new theme templates, I recommend using content staging. This is very helpfull for 'redesign and relaunch your site with content staging'.


Bureau Vet

Did my post solve your question? Help the community by marking it as a solution
webdew
Top Contributor | Diamond Partner

Hi @NShengKee ,

Sometime when you copy module there portal field JSon missing that by module now showing please look field json also and drag and drop working on latest version boilerplate. it possible only boilerplate theme base.

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regard.

0 Upvotes