The default code of cakephp paginator sorting label.
<?php echo $this->Paginator->sort('first_name'); ?>
We can change it as follows:
echo $this->Paginator->sort('first_name', 'First Name');
Explanation:
Here we can change the displayed label for CakePHP paginator:
Let say, if we want to sort course results by course_name.
This is how it is done by default cakephp paginator:
echo $this->Paginator->sort('course_name');
If we want to change the displayed label:
echo $this->Paginator->sort('course_name', 'Course/Skill Name');
Here 'Course/Skill Name' is the label which will be displayed.
course_name is the name of the column to be sorted.
0 Comment(s)