Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$ this-> Paginator-> sortを使用してリンクを生成したいのですが、現在のテーブルにない、このテーブルに関連するフィールドでソートしました。だから私はそれをすることができますか?そしてそれを行う方法は?
本当にありがとう!
並べ替えの外部フィールドの場合、次のように実行できます。
<th><?php echo $this->Paginator->sort('ExternalModelName', 'ExternalModelName.fieldname'); ?></th>
ただし、モデルの関係も正しくなければなりません。したがって、関係が正しく設定されていると仮定すると、上記は機能します。