Problem/Motivation
Currently there's the views content "View row" to output a defined number of rows from a views context.
This is very handy if you've to limit the output to a specific number of rows independent from the pager.
What currently is missing is the possibility to display all the rows without any other views element - and have the number of rows defined by the pager.
Proposed resolution
Extend the current views content "View row" to allow to output all rows of a views context.
The attached patch does that manly by adding some conditions in the code and a new form field to manage the setting.
New behaviour:
If no rows are specified for output, all rows will be used.
This should be compatible with the earlier versions of this plugin.
Remaining tasks
Review attached patch.
User interface changes
New checkbox "Limit rows" on plugin settings form.
New text "Show all" all in admin title.
API changes
none.
Comments
Comment #1
das-peter commentedFix for the case that there are no rows to display.
Comment #2
das-peter commented*grml* Next fix.
Very ugly thing that row_index modification.
Would it be better to change the way how the row setting is stored?
But this would break backward compatibility...
Comment #3
merlinofchaos commentedRather than using a row index modifier, we should take $conf['rows'] and copy it into an array of rows to display. We can then modify the index there so we don't have to remember this later.
Something like this (pseudo code, don't cut & paste)
Then proceed normally knowing that $row_indexes will be correct.
Comment #4
das-peter commentedThank you very much for the review & this is indeed a nice idea!
Pseudo code cut & pasted - but also adjusted ;)
Comment #5
das-peter commentedJust came across a possible issue - updated patch.
Comment #6
merlinofchaos commentedThat's a much nicer patch!
Committed and pushed!
Comment #7
das-peter commentedJust awesome - thank you very much!