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.
It would be good if we started to add more token support for core tokens. With the hope of using this more widely throughout views.
Here is an initial patch to get thing started. Adds new tokens for result count, base table, and base field.
Comment | File | Size | Author |
---|---|---|---|
#5 | 1817938-5.patch | 3.83 KB | damiankloip |
#3 | 1817938-3.patch | 3.15 KB | damiankloip |
#2 | 1817938-2.patch | 2.26 KB | damiankloip |
views-additional-tokens.patch | 2.18 KB | damiankloip | |
Comments
Comment #1
dawehnerBetter use $this->executeView($view);
A random suggestion, what about adding the total items if available?
Comment #2
damiankloip CreditAttribution: damiankloip commentedGood point.
Comment #3
damiankloip CreditAttribution: damiankloip commentedWith a couple more tokens...
Comment #5
damiankloip CreditAttribution: damiankloip commentedForgot to add the changes to the yml file to the patch. Also, I realised if the the items per page is 0 we would set this to 1 for the division.
Comment #6
dawehnerThis looks good now
Comment #7
tim.plunketthttp://drupalcode.org/project/views.git/commit/f25472c