• About Me




    Lily@Melbourne, Australia

    Login

  • Follow 静水深流 || Still waters run deep on WordPress.com
  • Archives

CakePHP 在Pagination上使用自己的标签

怎么在sort上加自己的标签,而不是使用默认的字段名,但依然保留排序功能?

默认格式

Paginator->sort('fname');//fname 是字段名变成这样
Paginator->sort('fname', 'First Name');//First Name是想在表格上显示的标题?>

First Name 是会显示出来的标题。
fname 是作为排序的字段名。

大功告成:)

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: