Create an ODT or ODS document template: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
Tag: 2017 source edit
mNo edit summary
Tag: 2017 source edit
Line 118: Line 118:
*Inside this file, just write one function like this:
*Inside this file, just write one function like this:


<source lang="php">
<syntaxHighlight lang="php">
/** Function called to complete substitution array (before generating on ODT, or a personalized email)
/** Function called to complete substitution array (before generating on ODT, or a personalized email)
  * functions xxx_completesubstitutionarray are called by make_substitutions() if file
  * functions xxx_completesubstitutionarray are called by make_substitutions() if file
Line 135: Line 135:
   $substitutionarray['myowntag']=$myvalue;
   $substitutionarray['myowntag']=$myvalue;
}
}
</source>
</syntaxHighlight>


Function will be called before generating document to complete the array used for substitution and to replace tag myowntag with value $myvalue. You can add as many tags as you need and put all personalized code you want to define values (search into database, into files, calculation, from received parameters or from global variables)...  
Function will be called before generating document to complete the array used for substitution and to replace tag myowntag with value $myvalue. You can add as many tags as you need and put all personalized code you want to define values (search into database, into files, calculation, from received parameters or from global variables)...  

Navigation menu