Line 67:
Line 67:
==For an existing module==
==For an existing module==
Do not directly modify an existing template. Copy the file of the template used as example into a new name in same directory and edit it to change content.
Do not directly modify an existing template. Copy the file of the template used as example into a new name in same directory and edit it to change content.
−
For this example, we will call our new template 'mycompanyblue', based on the existing template 'azur':
+
For this example, we will call our new template 'mycompanyblue', based on the existing template 'cyan':
−
*Copy and paste file pdf_propale_azur.modules.php
+
*Copy and paste file pdf_cyan.modules.php
−
*Rename the copy as pdf_propale_mycompanyblue.modules.php
+
*Rename the copy as pdf_mycompanyblue.modules.php
*Edit and make the following changes in the code:
*Edit and make the following changes in the code:
−
#Rename 'Class pdf_propale_azur { ' to 'Class pdf_propale_mycompanyblue { '
+
#Rename 'Class pdf_cyan { ' to 'Class pdf_mycompanyblue { '
−
#Rename constant $this->name to match your new template name. For example for 'azur' template, change line '$this->name = "azur";' to '$this->name = "mycompanyblue";'.
+
#Rename constant $this->name to match your new template name. For example for 'cyan' template, change line '$this->name = "cyan";' to '$this->name = "mycompanyblue";'.
#Save file. Now the template will be available in the list of models in Dolibarr.
#Save file. Now the template will be available in the list of models in Dolibarr.