CMS Development

Jere
Contributeur

A drag and drop area inside a custom module

Résolue

Is it possible to make a custom theme component have a drag and drop area inside itself? So I drag a component to a page, and then that component has an area in itself that more components can be dragged into. For an example a card component where images, buttons and rich texts could be dragged into.

0 Votes
1 Solution acceptée
alyssamwilie
Solution
Expert reconnu | Partenaire solutions Elite
Expert reconnu | Partenaire solutions Elite

A drag and drop area inside a custom module

Résolue

Drag and drop areas are not available within modules. You could post something in the Ideas forum asking for this sort of feature, though I'm not entirely sure how possible it would be to have three layers of customizability.

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

Voir la solution dans l'envoi d'origine

2 Réponses
webdew
Guide | Partenaire solutions Diamond
Guide | Partenaire solutions Diamond

A drag and drop area inside a custom module

Résolue

Hi @Jere ,

No You cannot create any template modules with api but you can certainly create the template with this API ,

https://api.hubapi.com/content/api/v2/templates

For example:

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.hubapi.com/content/api/v2/templates',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"category_id": 1,
"folder": "example",
"is_available_for_new_content": "False",
"template_type": 4,
"path":"webdew/cart",
"source":"

"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer '.$token,
'Content-Type: application/json',
'Cookie: __cfduid=dbee73ed9d0d3ee23fabe7672fb9b848a1614580870'
),
));

$response = curl_exec($curl);

curl_close($curl);

In source you have to pass the html code but make sure you first do the string excaping of your template code as only then it will pass through json.

Please refer to this doc for further info. https://legacydocs.hubspot.com/docs/methods/templates/post_templates


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 Votes
alyssamwilie
Solution
Expert reconnu | Partenaire solutions Elite
Expert reconnu | Partenaire solutions Elite

A drag and drop area inside a custom module

Résolue

Drag and drop areas are not available within modules. You could post something in the Ideas forum asking for this sort of feature, though I'm not entirely sure how possible it would be to have three layers of customizability.

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.