Page 1 of 1

Create template/layout from UDT.

Posted: Tue Mar 14, 2023 5:28 pm
by funkyhead
Hello,
I try to convert 1.x to 2.x block content management with UDT :

OLD in cmsms 1.x :

$gcbOps =cmsms()->GetGlobalContentOperations();
$mybloc = $gcbOps->LoadHtmlBlobByName($blocname);
$mybloc = $mybloc + "bla bla";
$gcbOps->UpdateHtmlBlob($mybloc)

NEW in cmsms 2.x :
How to create a Core:Generic template in PHP from UDT, and update the content...
PS : i just know loading an existing content with : $mybloc = $smarty->fetch('cms_template:my_block');

Thanks a lot.

Re: Create template/layout from UDT.

Posted: Thu Mar 16, 2023 7:49 pm
by velden
I don't know why you want to do this but it's more complex than the old GCBs.

You could have a look at modules\DesignManager\action.admin_edit_template.php
It may give you some hints as where to start with your code.

Re: Create template/layout from UDT.

Posted: Sun Mar 19, 2023 9:27 am
by jce76350
@ funkyhead : mutipost see Forum FR