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 useful if in the configuration of the xls feed, a datetime stamp could be inserted (analogously to the %view variable) - something like %date (date only), or %timestamp (time included).
Comments
Comment #1
fuchs-1 CreditAttribution: fuchs-1 commentedComment #2
fuchs-1 CreditAttribution: fuchs-1 commentedComment #3
hwasem CreditAttribution: hwasem commentedThis would be a great feature!
Comment #4
redbread CreditAttribution: redbread commentedhi everybody! To add any pattern in your filename you can create own "mymodule_preprocess_views_export_xls_view_xls" function , copy from original "template_preprocess_views_export_xls_view_xls" and change this code:
$filename = strtr(
$vars['options']['filename'],
array(
'%view' => check_plain($view->name),
'%date' => date('d.m.Y'), // added string
),
);
Comment #5
hwasem CreditAttribution: hwasem commentedThanks for this, redbread! So that I'm clear, I copy the template_preprocess_views_export_xls_view_xls function into my_custom.module and substitute the code above for this section of code:
$filename = strtr(
$vars['options']['filename'],
array('%view' => check_plain($view->name))
);
(line 32-35) in my version?