Now I’ve got this plugin working, with some adaptation, it comes very close to what I’ve been trying to achieve, namely proper semantic markup for EE pagination.
The only problem is a lack of control over the ‘First’ link!
I’ve outlined how I think pagination should be marked up on the EE forums.
Aside from semantics, the benefits to this markup approach are that one has all the hooks that are needed to individually style:
* First
* Previous
* Numbered page links
* Current (unlinked) page
* Next
* Last
With this approach in mind, I’ve changed your extension’s lines 86 to 95…
$paginate_obj->next_div_o .= '<span' . $class . '>';
$paginate_obj->next_div_c .= '</span>';
$paginate_obj->num_div_o .= '<span' . $class . '>';
$paginate_obj->num_div_c .= '</span>';
$paginate_obj->cur_div_o .= '<span' . $class . '>';
$paginate_obj->cur_div_c .= '</span>';
$paginate_obj->last_div_o .= '<span' . $class . '>';
$paginate_obj->last_div_c .= '</span>';
$paginate_obj->prev_div_o .= '<span' . $class . '>';
$paginate_obj->prev_div_c .= '</span>';
...to…
$paginate_obj->next_div_o .= '<li class="next">';
$paginate_obj->next_div_c .= '</li>';
$paginate_obj->num_div_o .= '<li>';
$paginate_obj->num_div_c .= '</li>';
$paginate_obj->cur_div_o .= '<li>';
$paginate_obj->cur_div_c .= '</li>';
$paginate_obj->last_div_o .= '<li class="last">';
$paginate_obj->last_div_c .= '</li>';
$paginate_obj->prev_div_o .= '<li class="previous">';
$paginate_obj->prev_div_c .= '</li>';
But as is self evident in the above code extracts, there’s no control over what wraps the First link.
Sorting this out is beyond the wit of my limited PHP skills! Can I ask you guys to add it in please?
And what do you think about the pagination markup approach?
