So I want to change the template for creating new thirdparty contact. However, the documentation on the wiki is not very specific so I’ve decided to try and change the canvas via hook.
In my module, I have created following folder structure:
/mymodulefolder/canvas/contact/tpl/
and inside I’ve copied the original files contactcard_create.tpl.php, contactcard_edit.tpl.php and contactcard_view.tpl.php
This is the code I have so far, but it’s not working:
public function doActions($parameters, &$object, &$action, $hookmanager)
{
global $conf, $user, $langs;
$error = 0; // Error counter
if (in_array('contactcard', explode(':', $parameters['context']))) {
if ($action == 'create') {
$objcanvas = null;
$canvas = null;
require_once DOL_DOCUMENT_ROOT . '/core/class/canvas.class.php';
$objcanvas = new Canvas($this->db, $action);
$objcanvas->getCanvas('extendedthirdparty', 'contactcard', $canvas);
}
}
if (!$error) {
return $objcanvas;
} else {
dol_print_error($this->db);
return -1;
}
}
Any help appreciated.