83
edits
| 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 ' | For this example, we will call our new template 'mycompanyblue', based on the existing template 'cyan': | ||
*Copy and paste file | *Copy and paste file pdf_cyan.modules.php | ||
*Rename the copy as | *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 | #Rename 'Class pdf_cyan { ' to 'Class pdf_mycompanyblue { ' | ||
#Rename constant $this->name to match your new template name. For example for ' | #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. | ||
edits