This was brought up in our forum: https://forum.backdropcms.org/forum/how-fix-inconsistent-page-numbers#co...
In all places where I have paginated content, there's a discrepancy between the page number in the URL and the actual page. The current behaviour seems to be: Page number in URL = (Actual page number) - 1. This could be confusing for users copying/pasting the URL and being taken to a different page number.
"Chronic" Drupal/Backdrop users have explained that this is how things work, and that it's because the counter is zero-based, but this seems to be another "Drupalism" (and now "Bakdropism"). As the user went on to say:
I'm not using drupal, so maybe that's why it looked a bit more confusing to me :)
Perhaps we could introduce an option in views that would allow customizing this?
- respective issue for Views 7.x: Array index instead actual page number
- issue for Drupal core Views: Make pager start counting from 1, not 0
- module that offers this as a feature (since version 8.x-2.0): https://www.drupal.org/project/pagerer (the commit that introduced the feature)
- various threads that discuss this:
Recent comments
I agree with BWPanda about the better way to add a filter. As for your general question on how to add an array to a config file (which gets stored as json), have you tried: $config = config('...
How to programmatically insert an array into config file
I think that directly editing config is rarely, if ever, the best way to do something... Perhaps try loading a format (with it's filters) using filter_format_load(), add the new filter array (by...
How to programmatically insert an array into config file
My initial goal was to create a menu item that linked to a view that I had configured and that was being created on installation of the module, by including the view config file. To do this, I just...
How to programmatically create a menu link