CampaignMonitor::createTemplate PHP Method

createTemplate() public method

Creates a template. Returns the template ID when succesful
public createTemplate ( string $name, string $HTMLPageURL, string[optional] $zipFileURL = null, string[optional] $screenshotURL = null, string[optional] $clientId = null ) : string
$name string The name of the template. Maximum of 30 characters (will be truncated to 30 characters if longer).
$HTMLPageURL string The URL of the HTML page you have created for the template.
$zipFileURL string[optional]
$screenshotURL string[optional]
$clientId string[optional]
return string
    public function createTemplate($name, $HTMLPageURL, $zipFileURL = null, $screenshotURL = null, $clientId = null)
    {
        // set client ID
        $clientId = empty($clientId) ? $this->getClientId() : $clientId;
        // set parameters
        $parameters['Name'] = (string) $name;
        $parameters['HtmlPageURL'] = (string) $HTMLPageURL;
        $parameters['ZipFileURL'] = (string) $zipFileURL;
        $parameters['ScreenshotURL'] = (string) $screenshotURL;
        // return the result
        return $this->doCall('templates/' . $clientId, $parameters, 'POST');
    }