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.
Can the view results counter be edited to display in descending order vs. ascending? Or, can the output be limited to displaying the last record?
Setting items to display = 1 results in the first item in the counter displayed and I would like to display the last item. The counter results rise and fall so setting to skip a fixed number of records doesn't help.
Comment | File | Size | Author |
---|---|---|---|
#2 | randomsort.png | 30.91 KB | manogolf |
#2 | theminginfo.png | 25.7 KB | manogolf |
Comments
Comment #1
dawehnerYou can easily theme the field output and check on which row you are currently and just display when you want it, else return '';
Comment #2
manogolf CreditAttribution: manogolf commentedPerhaps if I knew a bit more about theming the field output this may be easier, but as a rookie my skills are weak at best. I've attached two screen captures and was hoping you could let me know if I'm on the right scent. The first capture is a shot of the view setting being used. Output is three and I would like to limit the display to the last current record added.
The second capture is where I think you are pointing me. If so which template should my focus turn too? And how would the else return"; look when integrated?
Comment #3
coolhandlukek2 CreditAttribution: coolhandlukek2 commentedHi,
I have a similar issue where it would solve a lot of problems if the output from the Sort criteria 'Global: Sort order' could be set to desending. Did you find a solution?
Re your other question
** Setting items to display = 1 results in the first item in the counter displayed
You can do this by adding a views filter on your contnent type ie if role 3 set the filter on role 3 then in Basic setting set your Items to display = 1
thx
Comment #4
coolhandlukek2 CreditAttribution: coolhandlukek2 commentedFound a solution on befused - Thx for posting
http://befused.com/drupal/views-count-results
Rename or delete "Showing and or result to your view title"
Exclude from display your results and then paste this in to your header / footer
Comment #5
esmerel CreditAttribution: esmerel commented