Développement module: Difference between revisions

Jump to navigation Jump to search
m
Line 83: Line 83:
<source lang="php">
<source lang="php">
// Array to add new pages in new tabs
// Array to add new pages in new tabs
$this->tabs = array('product:ComposedProducts:@composition:/composition/show_composition.php?id=__ID__');
$this->tabs = array('product:TabTitle:@mymodule:/mymodule/mynewpage.php?id=__ID__');
// where entity can be
// where entity can be
// 'thirdparty'      to add a tab in third party view
// 'thirdparty'      to add a tab in third party view
Line 111: Line 111:
** 'contract'
** 'contract'
* Partie 2: Le titre de l'onglet. Cela peut être un libellé en dur ou mieux un code traduction présent dans un fichier lang.
* Partie 2: Le titre de l'onglet. Cela peut être un libellé en dur ou mieux un code traduction présent dans un fichier lang.
* Partie 3: Le nom du fichier .lang qui contient la correspondance entre le code traduction et le libellé à afficher.
* Partie 3: Le nom du fichier .lang (sans l'extension .lang) qui contient la correspondance entre le code traduction et le libellé à afficher. Si ce com est précédé de @, Dolibarr cherche le fichier dansle répertoire lang propre au module, c'est à dire htdocs/mymodule/langs/code_CODE/mymodule.lang, sinon Dolibarr cherche le fichier traduction dans htdocs/langs/code_CODE/mymodyle.lang
* Partie 4: L'url de la page à afficher quand on clique sur l'onglet. La chaine __ID__ sera remplacée automatiquement par l'Id de l'entité concernée.
* Partie 4: L'url de la page à afficher quand on clique sur l'onglet. La chaine __ID__ sera remplacée automatiquement par l'Id de l'entité concernée.


Navigation menu