CMS Development

DM2
Member

Global within a module

Hi

 

I have about 20 modules that need to include a button.

 

I want to give a choice of many different button styles/icons etc. I can write a module that will handle the button choice but I know that you can't have a module within a module. Is there any other way of having a global include within a module?

 

Alternatively is it possible to access HubDb from a module (where I would store the button styles/icon references) and then a simple choice menu?

 

Thanks for any tips...

0 Upvotes
1 Reply 1
stefen
Key Advisor | Partner
Key Advisor | Partner

Global within a module

@DM2 maybe you could go a different route and just use a Call-to-Action? Seems like the built-in HubSpot CTA functionality offers everything you're looking to provide.

 

If that's not the direction you're looking to go, you can definitely access HubDB from within a module. The HubDB field selector in modules outputs the table's ID, then you can use that ID in the "hubdb_table_rows" function documented here: https://developers.hubspot.com/docs/cms/features/hubdb

 

Stefen Phelps, Community Champion, Kelp Web Developer