I was thinking about how to style the output for the active page number when pagination is active with something like [3], like we also see in the forum here.
One possibility was adding $display = ’[’ . $display . ’]’; to ditto.class.php after line 1124, but then we do something evil, because we are mixing presentation with programming logic. Bad idea.
Simpler: adding the [..] in the snippet, looking for this line of code:
$tplPaginateCurrentPage = isset($tplPaginateCurrentPage)? $ditto->template->fetch($tplPaginateCurrentPage) : "<span class='ditto_currentpage'>[+page+]</span>";
But then I remember I once read something about CSS, et voilà, we can achieve the same with adding those classes to our stylesheet:
.ditto_currentpage:before {
content: "\5b";
}
.ditto_currentpage:after {
content: "\5d";
}
Note: we need the HEX Code for the content property if we use high ascii characters. "\5b" = [, "\5d" = ]
We could also use the pipe | character, in HEX that’s "\7c"
The only drawback ... it doesn’t work in ... yeah, you guessed it already: Internet Explorer. Not even in IE 7
I wanted to share it anyway.
I have a question that’s related to styling the output of pagination: Is it already considered in a future release to have something like
1 [2] 3 4 ... 7
when we get more than 4 pages, as we see in most forums nowadays? I think that would be a nice feature.