Extra feature: Template preview

< Back to plan

Creating resources in MODX can be a cumbersome experience. We'll list some of the current issues for content managers.

Problem 1: Too many ways to create a resource

There are too many ways to create a resource currently. There should just be one way to create a new resource and it should have one name, not 'resource' and 'document'.

  • Top menu 'Content' -> 'New Resource'
  • 'New Document' button above the resource tree
  • Right-click a context -> 'Create' -> 'Document'
  • Right-click a folder -> 'Create' -> 'Document'
  • Right-click a resource -> 'Create' -> Document'
  • Some dashboards also contain the 'Create page' button in their widgets

Problem 2: Choosing the template

After creating a new resource, the first thing a lot of users do is change the template. But what does every template look like? Users have no idea what template to choose, especially users who don't manage their website on a daily basis. So changing a template might involve a lot of trial and error work to find out what template offers what features. Every try will take a lot of clicks because this dialog window appears:

Template change

Optional: We could even remove this warning, by automatically saving the resource.

Every template change takes X of actions:

  • Click template dropdown
  • Click template (or change to page 2 of your templates in case you have a large site)
  • Click Confirm template change
  • Wait for the page to reload

This happens a lot to content managers. This will probably look like this:

Solution: template picker with preview on-create resource

The solution is to prevent this all from happening by showing a modal-window when click 'create resource'. This modal window does not require a pageload, but will instantly show. It will show the following things:

  • Pagetitle field (required)
  • List of template(s)
  • (optional) Preview window of templates (contains PNG/JPG-screenshots of your templates) (can be disabled in system settings)
  • (optional) Description of what the template does (can be disabled in system settings)
  • Show template categories
  • Show 'Search' box if there are more than 8-10 templates (whatever exceeds the displayable room for the template lists)


PoC and concept by JP DeVries:  https://github.com/jpdevries/modx-create-resource
Work in progress for PR by Sander Drenth: https://github.com/sdrenth/revolution/commit/c46679cb405ec47b9b60d36076874c6ed5c65815

First design by Rinze

Second design by Rinze

Third design by Rinze