Include destination option for add content block

Created on 20 March 2023, over 1 year ago
Updated 26 April 2023, over 1 year ago

Problem/Motivation

This module is great and has been a great fit for one of our current projects. I might be missing something, but I think it would be really cool if the add content block included an option for the destination.

If I include a manage content view, (I cloned one from the admin/content view), the destinations are baked into the operations automatically. For the add content block they're not.

I imagine that some workflows might want to be redirected to the node view page itself, that's why it can be a configuration that's default is 0.

✨ Feature request
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States asherry

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @asherry
  • πŸ‡ΊπŸ‡ΈUnited States asherry

    Here's a patch to start things off.

  • πŸ‡ΊπŸ‡ΈUnited States asherry
  • πŸ‡ΊπŸ‡ΈUnited States asherry

    I forgot to mention that in the configuration form there is an accent in the title "MenΓΌ items". I fixed that as well in this same patch, but let me know if I should create another ticket.

  • Assigned to Erik Seifert
  • Status changed to Needs review over 1 year ago
  • πŸ‡©πŸ‡ͺGermany Erik Seifert

    We should have a better label than "Include destination". Something like "Return to dashboard after create content".

  • Issue was unassigned.
  • πŸ‡ΊπŸ‡ΈUnited States asherry

    I was just following precedent, the views entity operation links has the same label.

    Drupal\views\Plugin\views\field\EntityOperations

        $form['destination'] = [
          '#type' => 'checkbox',
          '#title' => $this->t('Include destination'),
          '#description' => $this->t('Enforce a destination parameter in the link to return the user to the original view upon completing the link action. Most operations include a destination by default and this setting is no longer needed.'),
          '#default_value' => $this->options['destination'],
        ];
    

    I'm not saying I'm in love with the label of "include destination" but at least for developers it matches other interfaces, and it's clearer as to what will actually happen. "Return to dashboard after create content" to me might mean we'd be doing a redirect.

    Is there an ability also for these dashboard blocks to be placed with the regular block layout? Or might there be anything in the future for placing a dashboard entity in another context? That would also be confusing for this label.

    Maybe, "Include destination query parameter"?

  • Status changed to Fixed over 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024