Delete registered partner template landing.demos.unregister

We are still updating this page

Some data may be missing here — we will fill it in shortly.

Scope: landing

Who can execute the method: any user

The method landing.demos.unregister deletes the registered partner template. It returns true or an error. If the template has already been deleted or not found, it will return false.

Warning

Both the site template with this code and all page templates with this code will be deleted. Created sites and pages based on these templates will remain untouched.

Parameters

Parameter

Description

code
unknown

Symbolic code of the template.

Examples

try
        {
        	const response = await $b24.callMethod(
        		'landing.demos.unregister',
        		{
        			code: 'myfirstsite'
        		}
        	);
        	
        	const result = response.getData().result;
        	console.info(result);
        }
        catch( error )
        {
        	console.error(error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'landing.demos.unregister',
                    [
                        'code' => 'myfirstsite'
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            if ($result->error()) {
                error_log($result->error());
                echo 'Error: ' . $result->error();
            } else {
                echo 'Info: ' . print_r($result->data(), true);
            }
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error unregistering demo: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'landing.demos.unregister',
            {
                code: 'myfirstsite'
            },
            function(result)
            {
                if(result.error())
                {
                    console.error(result.error());
                }
                else
                {
                    console.info(result.data());
                }
            }
        );
        

How to Use Examples in Documentation