このように難しいことではないようですが、私にフィット感を与えています。
モデルの__constructメソッドで変数を初期化します。
view.html.phpおよびdefault.phpファイルでそれらにアクセスする必要があります。
私のモデルでは:
$this->MyVar = 'somevalue';
私のview.html.phpでは:
$model = $this->getModel('mymodelname');
print_r($model) //checking, yes - the model's being pulled in
$myvar = $model->__construct($this->MyVar);
echo $myvar; //empty
何が間違っているので、どうすれば修正できますか?
ありがとう!
=========================================
解決:
$model = $this->getModel('mymodelname');
echo $model->MyVar; // returns the variable in the model