We wanted the first and last links in the pager be visible (as in this below image), but somehow they were not appearing by default.

After lots of views fiddling and troubleshooting, we reliazed that these links were showing up for other themes and NOT showing up for the Bootstrap theme, let along for our Wetkit Bootstrap based sub-theme.
It seems that the Bootstrap theme has the first and last links commented out in the pager.func.php file located here (/profiles/wetkit/themes/bootstrap/templates/system/pager-func.php). Once we uncommented out the necessary lines for first and last and cleared the cache, the links appeared and are working normally!
We then copied that file into our sub-theme and updated the function name to use our sub-theme hook and all is good now.
Not sure if this is a bug or a "works as designed", but in the hopes of saving others some time, I thought I should report this because it was a bit difficult to find/figure out.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | bootstrap-first-and-last-pager-links-2343721-20.patch | 423 bytes | ivan.lewas |
| #18 | bootstrap-first-and-last-pager-links-2343721-18.patch | 440 bytes | diegohermes |
Comments
Comment #1
jayson commentedFYI: There is a comment inside the pager.func.php file that states:
// @todo add theme setting for this.So we are to assume that this was on the "todo" list, but hasn't been addressed yet.
Comment #2
sylus commentedThanks for the very detailed and concise issue report it greatly helps me when reviewing issues.
I looked into this and I believe what the maintainer for the bootstrap base theme intended is this would be an opt in option from the theme but that the functionality just hasn't been added yet as there have been much more pressing issues.
I'll move this issue to the bootstrap queue as I couldn't find an existing issue to mark this as a duplicate but will mark as a lower priority.
Comment #3
sylus commentedComment #4
markhalliwellHm. IIRC, someone had fixed this in the 8.x branch, but never got backported. Also, I think this was originally to just show the first and last if they were actually necessary, but somehow they ended up being commented out entirely. The temporarily solution is to, indeed, copy this over to your sub-theme and just re-enable them.
Regardless, this does need to be addressed.
Marking issue appropriately.
Comment #5
rcodinaThanks Mark for your workaround suggestion! However, I finally copied the boostrap_pager function from pager.func.php to template.php of my bootstrap subtheme. Then, I uncommented first and last buttons. I wish this gets solved officially ASAP!
Comment #6
ñull commentedThanks for the hint. For people less instructed here is the work around in steps.
// @todo add theme setting for this.where they were.Since this is commented in the source with @todo add theme setting for this, I cannot consider this a bug, but rather a missing feature. I therefore marked it as such with a Todo List" tag.
Comment #7
markhalliwellComment #8
bisw commentedThanks @jayson, its save a lot of time.
Comment #9
markhalliwellComment #10
ivan.lewas commentedI've gone through the same problem in a project I'm working on so I've made a simple patch that adds the first and last links and also adds a configuration on the theme settings.
Comment #11
wundo commentedComment #12
burnsjeremy commented#10 Works great, patched, set theme setting and pager had first and last links displaying and working right.
Comment #13
wundo commentedComment #15
wundo commentedComment #16
markhalliwellGiven the fact that Bootstrap has two different styles: "pagination" and "pager" and the fact that we have incidentally correlated Bootstrap's "pagination" to mean Drupal "pager", I would prefer that the fieldset be labeled "Pagination" to be in-line with the actual Bootstrap component being used here: http://getbootstrap.com/components/#pagination
Comment #17
markhalliwellErr, wrong status
Comment #18
diegohermes commentedI agree with Mark, here is a patch with the label changed.
Comment #19
markhalliwell@diegohermes, thanks for the patch :)
Upon re-reviewing the original patch/commit, I just realized that the default theme setting is missing from bootstrap.info (insert at line 66).
Considering that this is technically a "feature request" (aka addition), I think it's ok that we enable it by default (
1).Comment #20
ivan.lewas commentedI agree with @marcarver, here is a patch for adding the default setting.
Comment #21
ivan.lewas commentedUpdating status.
Comment #23
markhalliwellComment #24
grahamvalue commentedSubscribing.
Will this fix be available after the next module update?
Comment #25
wundo commentedYes, it's even already available on the dev release.
Comment #26
grahamvalue commentedThank you!
Is there an ETA for the production release?
Comment #27
markhalliwellThis project is a [base-]theme, not a module. There is no ETA on the next production release (we're all volunteers here). The current "backlog" are these major and critical issues.
Comment #28
grahamvalue commentedSorry! Hope that didn't come across as pushy.
Was just wondering how long it would take to get the first and last buttons.
Have temporarily done the fix from #6.
But have done it on the base theme instead of the sub theme (after backing up the original file) so that next update will overwrite the changes.
Thank you for responding!