3

私のプロジェクトでは、私の見解では次の方法があります。

public function elegirSeleccionados(){
    $this->assignRef('pagination', $this->get('pagination'));
    $this->assignRef('items', $this->get('recientes'));
    $this->assignRef('list', $this->get('list'));
    parent::display();
}

assignRefこのJoomla3では非推奨/削除されています。

代わりに何を使用すればよいですか?

4

2 に答える 2

7

Joomla1.6以降では少なくともPHP5.2が必要なため(PHP5は参照による割り当てを使用します)、assignRef()とassign()は不要になりました。

view.html.phpで使用

$this->pagination = $this->get('pagination')

テンプレートでは、を呼び出すだけ$this->paginationです。

あなたのスキルを最新のものにするために、公式のJoomlaをチェックしてください!ドキュメンテーション

于 2013-02-14T20:42:30.420 に答える
0

このためのtxsですが、私のビュー(default.tpl)ではzehvalは表示されません

view.html.php

$this->my_string = "ledl";
<br>
return parent::display($tpl);

default.tpl

<bold>{$this->my_string}</bold>
于 2014-09-16T21:45:08.823 に答える