Ciao ragazzi, espongo il problema:
- ho una view 'SocialMarketViewProfile' alla quale devo attaccare il model 'SocialMarketModelSocialMarket'
- nel controller:
- Nella view:codice:function __construct() { parent::__construct(); switch(JRequest::getString('view')) { case 'profile': $view =& $this->getView('Profile','html','SocialMarketView'); $model =& $this->getModel('socialmarket'); $view->setModel($model,true); $view->display(); break; ..... } }
codice:function display($tpl = null) { $profile = $this->get('ProfileByIdp'); $this->assignRef('profile', $profile); parent::display($tpl); }
- nel default.php tpl è tutto ok se uso l'array profile ma tutto l'html che esiste già me lo riscrive 2 volte.
Es.:
(prova me lo stampa 2 volte)codice:$profile = $this->profile; echo $profile->main_name; echo " prova";
qualcuno mi sa illuminare?Grazie!

Grazie!
Rispondi quotando