Jump to content

[Résolu] Utiliser Variable D'un Module Dans Mon Header.tpl


Recommended Posts

Bonjour

J'ai modifié un module en ajoutant une variable dans mon fichier monModule.php

Je parviens à récupérer ma variabledans  monModule.tpl grâce à {$maVariable}

mais j'aimerai également récupérer cette variable dans header.tpl et là je bloque!!

Je cherche, je cherche ... sûrement au mauvais endroit mais je n'y arrive pas ...

 

Dans monModule.php

J'ai ajouté ceci pour créer ma variable :

 

public $maVariable = 'test variable'

 

public function hookHeader()
    {
     global $smarty;               
     $this->smarty->assign('maVariable',$this->maVariable);
      
    }

 

Dans monModule.tpl lorsque j'appelle {$maVariable} cela m'affiche bien ' test variable '

 

Comment faire pour y avoir également accès dans header.tpl??

 

D'avance merci à vous ...

Edited by romelik (see edit history)
Link to comment
Share on other sites

effectivement monModule vient juste après mon header c'est un module TopMenu ... donc je pensais bien que c'était la cause  ... peux-tu être plus précis dans la marche à suivre pour envoyer ma variable dans HOOK_HEADER  s'il te plaît ??

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...