Child theme only includes json files

NLussier
Participant

Hello, 

I created a child theme in Design Manager following the two steps listed here: https://developers.hubspot.com/docs/cms/building-blocks/themes/child-themes

 

In the child theme folder, I only see the json files. I don't see all the other files like modules and templates. 

 

When I create a new page using the child theme, I can see the templates and the modules are available when I edit the page.

 

Anyone know a way to get all the files like modules and templates in the child theme folder in Design Manager so I can customize them?

 

Thanks!

0 Upvotes
5 Replies 5
dennisedson
Community Manager

@NLussier 

Do you have a screenshot to illustrate what you are seeing?

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
NLussier
Participant

Sure. Attached two Design Manager screenshots. One is the original theme, and the second one is the child theme.

Screen Shot 2021-06-04 at 3.24.54 PM.png

Screen Shot 2021-06-04 at 3.28.33 PM.png

0 Upvotes
dennisedson
Community Manager

Ok, gotchya!

So when you create a child theme, initially, everything is inherited from the parent.  To make modifications, you will need to clone the module/ template and add it to the new child theme in the same path as the parent.

So, pretending you want to modify a slider module

If that module is in the following path in the parent theme:

Theme-parent/modules/slider

the you would create a copy at this path

Theme-child/modules/slider

 

Does that make sense? 

From the FAQs on the page you references, the 2nd and 3rd points are relevant

  • What assets are inherited from the parent theme?
    All files are inherited from the parent theme unless they are overwritten in the child theme.
  • How can I override a particular asset from the parent theme?
    A file in the same relative path of a child theme will overwrite the equivalent file from the parent theme. So, for instance, to overwrite @marketplace/parent/theme/templates/about.html you can create /child/theme/templates/about.html and make your edits to the new file. The new file will take effect instead of the inherited file. Note that this applies to your fields.json file as well as other files in the theme.

 

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
NLussier
Participant

Hi Dennis, thanks for getting back to me. Looks like I can't clone modules or templates since it's a marketplace theme. I'm guessing I could clone the theme and then move the updated modules I want into the child them?

Nancy

0 Upvotes
webdew
Top Contributor | Diamond Partner

Hi @NLussier ,

As we are checking that you are creating a theme. And if you are using this kind of setup. you have to create everything like CSS, js, and another template setup.You can use these steps to create the theme in Hubspot and you can customize it according to your need it's very easy not to need to link and set up the files.
https://developers.hubspot.com/docs/cms/guides/getting-started-with-themes
You can also use the HubSpot default theme and customize it. https://developers.hubspot.com/docs/cms/building-blocks/themes/default-themes

Hope this helps!


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

Thanks and Regards. 

0 Upvotes