Template "Preview"-Image in New Page Dialog

I was wondering if it’s possible to extend the Template-Selection Screen on the Create New Page Dialog, to e.g. add a preview picture/screenshot for each template.

template

E.g.

default

  • templates/default.php
  • previews/default.jpg

project

  • templates/project.php
  • previews/project.jpg
    … etc …

which would have an onchange event to show a template-preview once a selection is active.
I would find that useful when having a one-pager Scenario where there’s already plenty of templates for children-pages to use to build several sections.

In the Docs we are adding functionality to the panel in a certain page

So I wonder if that “New Page” dialog is also accessible via a custom plugin in a similar fashion.

Thanks,

This plugin might be the solution for me. After reading the .js it seems to add some functionality which makes the magic happen. After a short test, i could just easily add a “info” field to include the screenshot. Gonna fiddle around with that, thanks for your help!

addFields:
    info:
        label: Preview
        type: info
        required: false
        theme: none
        text: |
          (image: https://via.placeholder.com/150 alt: 123)

Results:

2021-07-30_16-07-45

1 Like