Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Our client wanted to be able to override the the number of items configured in the view.
I implemented this feature and share it with you. If you like the feature. please review it.
The patch is against the latest Viewfield 3.-dev version.
Note:
You need to run drush updb after applying the patch.
Comment | File | Size | Author |
---|---|---|---|
#4 | 3003839-viewfield_items_to_display_option-2.patch | 5.95 KB | kkri |
#2 | 3003839-viewfield_items_to_display_option.patch | 6.24 KB | ayalon |
Comments
Comment #2
ayalon CreditAttribution: ayalon commentedComment #3
jerdavisThis is an interesting idea. If there is more interest in this, let's please re-roll the patch and perhaps also include some further UX.
1) Make this optional enabled/disabled on the field settings
2) Possibly add a details set for advanced options to the field widget and place this option there?
Comment #4
kkri CreditAttribution: kkri at Liip for FREITAG lab. AG commentedReroll against 8.x-3.0-alpha3.
Comment #5
jerdavisThis patch is not applying and does not contain any additional UX. Please provide an update and I'll review.
Comment #7
jerdavisI manually applied the patch and made some updates to improve UX. Pushed in 7c53f62
Comment #9
ecj CreditAttribution: ecj commentedTo have this work, you must have the pager set to:
> use Pager: Display a specified number of items | items
Comment #10
ecj CreditAttribution: ecj commentedprogrammatically force the correct pager type from 'None' to 'Some':
in code somewhere around line 170
Comment #11
quotientix CreditAttribution: quotientix commentedThanks @ecj - your comment helped me!