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.
This patch allows to use some arguments in the name of the exported file. If the argument is a node nid, its value is replaced by the node title.
Comment | File | Size | Author |
---|---|---|---|
#8 | views_bonus-702180-9.patch | 4.9 KB | Boobaa |
#5 | views_bonus-HEAD_args_in_filename.patch | 4.22 KB | dboulet |
#2 | views_bonus__export_filename.patch | 2.76 KB | B-Prod |
Comments
Comment #1
neclimdulpatch missing
Comment #2
B-Prod CreditAttribution: B-Prod commentedSorry, stupid omission!
Comment #3
djroshi CreditAttribution: djroshi commentedI'm getting an error at
/admin/build/views/ajax/display/[view name]/feed_1/style_options
caused by the following line in views_bonus_plugin_style_export.inc
'#description' => t('The filename that will be suggested to the browser for downloading purposes. %view will be replaced with the view name , !arg.',array('!arg' => implode( ',', array_map( create_function('$item','return "%$item";'), array_keys($view->display[$view->current_display]->handler->get_option('arguments')))))),
Comment #4
B-Prod CreditAttribution: B-Prod commented@djroshi: Is it possible to have more details about this error, like the PHP message if any.
array_map error ?
isset error ?
Thanks
Comment #5
dboulet CreditAttribution: dboulet commentedHere's an alternate patch, for review.
Comment #6
Cyberwolf CreditAttribution: Cyberwolf commentedSubscribing.
Comment #7
dambrisco CreditAttribution: dambrisco commentedSubscribing.
Comment #8
BoobaaTaking dboulet's patch in #5 as a foundation, I have added two more tokens: %timestamp (provides something like 2010-10-06_12-45-50) and %exposed (provides something like filter1_foo-filter2_bar).
Comment #9
ionmedia CreditAttribution: ionmedia commented#8 looks very interesting, can you, Boobaa, attach patched file ? (i have no access to shell on my hosting, only ftp)
Comment #10
maartenzam CreditAttribution: maartenzam commentedApplied patch from #5 and works as expected.
Thanks!
Comment #11
sgtsaughter CreditAttribution: sgtsaughter commentedThis is an old patch, but just confirming that patch #5 works great.
Comment #12
John Franklin CreditAttribution: John Franklin commentedPatch in #5 is still a great patch. So is #9. One of them should be committed.
Comment #13
John Franklin CreditAttribution: John Franklin commentedIn the patch from #8,
$view->exposed_input[$handler->options['expose']['identifier']]
may be an array, not a value. The value will need to be flattened somehow to prevent check_plain() warnings.Comment #14
neclimdul