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

fuchs-1’s picture

Category: feature » bug
Priority: Minor » Normal
fuchs-1’s picture

Category: bug » feature
hwasem’s picture

This would be a great feature!

redbread’s picture

hi 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
),
);

hwasem’s picture

Thanks 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?