CMS Development

Demetri
Member | Partner
Member | Partner

Edit module meta.json

I have been building a hubspot theme which contains custom modules.  I have been using the "Files & Templates > Design Tools" interface for pretty much everything.  But now i need to edit the meta.json on a few custom modules.

 

How can i do this? Can i do this in the Design Tools?

0 Upvotes
1 Reply 1
Ntbrown
Contributor

Edit module meta.json

The meta.json and fields.json are represented visually within the online editor rather than via code editing (textually) in a few places within the design managers editing interface. Starting with the easiest first...

For editing via the CLI / locally.... Just install the hubspot CLI, add the auth for your portal as described in the getting started guide for the CLI, fetch the source / theme files and use the watch command whilst editing the meta.json and it'll be synced back upstream.

For the design manager editing....

You can see the "copy json" option on the fields of the module when editing within the designer manager giving the json representation of fields.json. Editing fields naturally changes this.

Similarly, for meta.json, in the visual editor you can click on the "template types" link to change the "host_template_types", the label, inline help text (below fields dropdown), as well as the linked files and marketplace tags (js_assets, css_assets, tags, external_js, etc as defined in meta.json)

is_available_for_new_content is a switch at the top of the module / file editor. Just poke around. It's all there. Off the top of my head I don't recall editing smart types or global flags. Although I could be mistaken and there may be one or two errors above as I'm not double checking this.