Is it possible to make the "Templates library" a view

Created on 10 November 2022, about 2 years ago
Updated 16 July 2023, over 1 year ago

At the moment if a content editor clicks to "choose_template_from_library" action a "hardcoded" list is shown.

If you have a lot of templates it would be very convenient to be able to filter and sort them.
It would also be super if you could change the render of the library items.

Both of these would be possible if a "standard" drupal view was rendered.
Would this be possible?

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium weseze

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇿New Zealand john pitcairn

    This looks like it should be technically possible, something broadly like:

    • Add a view display or perhaps a dedicated tagged view for the purpose.
    • Add contextual arguments for section storage type and section storage id.
    • Use those arguments to format the correct "import section" link/image for each item in the view.
    • Add a setting somewhere to select the view/display, default to none.
    • Perhaps a 3rd-party setting on the entity bundle view mode?
    • Alter ChooseSectionFromLibraryController::build() to pass in the arguments and render the view, if a view is set.
Production build 0.71.5 2024