CMS Development

shullski
Participante

Easier way for marketers to grab module snippets?

Hey all - question regarding custom HubSpot modules. 

 

I am making custom modules for our marketing team to include on our welbsite pages and blog posts, however, there is one issue. To get a unique Snippet Usage code for a module (which you have to use to include in a module in a blog post), you have to go into Design Manager and grab that code. I know we can just keep the Snippet saved somewhere, but that will cause problems because the module ID is not unique.

 

The issue is that not all of the marketing team has access to the design manager - nor do they like the idea of it given how easy it would be for them to break something. Is there an easier route within HubSpot for the marketing team to get unique Module Snippet Codes outside of Design Manager?

 

It seems like there should be some list that can be used as a resource for marketers without requiring them to go into design tools.

 

Thanks!

0 Avaliação positiva
11 Respostas 11
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Easier way for marketers to grab module snippets?

@shullski, what kind of modules are we talking about?  why not add a module with everything and have if statements around each field so if there is no value, it is not printed?

shullski
Participante

Easier way for marketers to grab module snippets?

These are custom Hubspot Modules that I coded myself.

 

The issue is actually adding the module to the content. While you are in the blog editor, the way you can add a module to a specific post is by copying and pasting the Snippet Code which you find in the design manager. 

The marketing team does not have access to the design manager however. I was curious if there was any other resource available within HubSpot that would allow a marketer to grab a Snippet Code somewhere OTHER than inside the "Design Manager".

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Easier way for marketers to grab module snippets?

@shullski, I am saying that you could build a custom module with all of the various options and wrap each of the options in an if statement within that custom module so they code that is wrapped doesnt display if the editor does not add any content.

Then, you would add the custom module to the blog template in the design manager.

After you publish this, the marketing team would go about their business as normal.  When they create a new blog post, they would see the custom module that you built for them and can add content to that as needed.  They would NEVER need to go to the design manager. 

What I think you are really asking for is a flexible column for blog templates.  This doesnt exist 😞

 

 

0 Avaliação positiva
shullski
Participante

Easier way for marketers to grab module snippets?

Ohhh my mistake, I see what you are saying.

 

With what you are saying though - I wont be able to place that module WITHIN the body of the blog post, just the areas around it that are accessible inside of the template editor. Also, they would be static in their placement, a marketer couldnt choose where to place a given module in the flow of the page.  

 

 

 

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Easier way for marketers to grab module snippets?

Yeah. It is more constrained. Unsure if it would work, but maybe make that module a repeater. Have one option a rich text field that you would use to replace the blog content field. Then they could add new items and drag them around. Never tried this. Not sure it will work, but try it and let me know. I will steal it 😉
0 Avaliação positiva
shullski
Participante

Easier way for marketers to grab module snippets?

Basically this is the only solution I have at the moment. I am going to provide a doc to the marketing team that will include all of the Custom Modules available to them as well as the Snippet Code for each. 

 

The unique module number in the code does not have to be generated specifically by HubSpots key generator...it can be anything you want (you just have to ensure its unique to have its own unique content).  

 

So for example. They'd copy the following code for the module they want from the spreadsheet.

{% module "unique_name_here" module_id="9999999" label="Custom Module" %}

Then copy that code into the cotent editor for a blog... and replace "unique_name_here" with a name that would follow whatever system marketing would put in place to ensure it was unique. My thought was module-name_page-name_date-of-creation.

 

So the only work marketing has to do is copy/paste and name the module accordingly. Curious about your thoughts on this. 

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Easier way for marketers to grab module snippets?

@shullski, pretty sure you cant use hubl in a content editor

0 Avaliação positiva
shullski
Participante

Easier way for marketers to grab module snippets?

Exactly what I thought too.

 

If you plop in the snippet, and refresh the page (I usually just back out and click back on the post), it will render the component and it will also show up in the module list for you to edit the content.

 

You actually dont even have to go into the code view, just use it in the WYSIWYG editor

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Easier way for marketers to grab module snippets?

weird.  i cannot get that to work on my end. 

 

0 Avaliação positiva
shullski
Participante

Easier way for marketers to grab module snippets?

Hmmm strange. Make sure its in it's own block on the editor. Did you paste it with the WYSIWYG editor? Cause it wont work if you paste it in as source source. 

 

Paste it, click outside of the editor so HubSpot does its stuff and autosaves, and refresh the page. If there is default content, the module should render. If you click on the module list, it should be there with whatever value "label" is set to. 

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Easier way for marketers to grab module snippets?

nope 😞

if it works for you, that is all that matters.  just keep an eye on it in case it breaks