A drag and drop area inside a custom module

SOLVE
Jere
Participant

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 Upvotes
1 Accepted solution

Accepted Solutions
amwilie
Solution
Key Advisor | Elite Partner

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.

border

Alyssa Wilie

Web Developer at LyntonWeb

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

View solution in original post

2 Replies 2
amwilie
Solution
Key Advisor | Elite Partner

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.

border

Alyssa Wilie

Web Developer at LyntonWeb

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

View solution in original post

webdew
Top Contributor | Diamond Partner

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 Upvotes