Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback for dashboard widgets in custom manager theme #16705

Merged

Conversation

halftrainedharry
Copy link
Contributor

What does it do?

Loads the dashboard widget templates from the default theme, if they don't exist in the custom manager theme.

Why is it needed?

The documentation states that "The Manager will fall back to the default theme templates for any that have not been overridden."
This is currently not the case for the dashboard widgets (that load a Smarty template).

How to test

  • Create a new folder in manager/templates for a custom manager theme and change the system setting manager_theme.
  • DON'T create copies of the files in manager/templates/default/dashboard in your own custom theme folder.
  • Make sure the dashboard widgets get displayed on the manager welcome page.

Related issue(s)/PR(s)

Related topic in the MODX forum: https://community.modx.com/t/manager-theme-customization-problem/8261

@modxcommunity
Copy link
Collaborator

This pull request has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/manager-theme-customization-problem/8261/6

@opengeek opengeek added the pr/review-needed Pull request requires review and testing. label Feb 11, 2025
@opengeek opengeek added this to the v3.1.1 milestone Feb 11, 2025
@modxcommunity
Copy link
Collaborator

This pull request has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/manager-theme-customization-problem/8261/7

@jenswittmann
Copy link
Contributor

@halftrainedharry thanks for your PR! I test it on a fresh MODX 3.1.0 Installation and it works ✅

@SilverMabol
Copy link

SilverMabol commented Feb 14, 2025

@halftrainedharry thanks for your PR! I test it on a fresh MODX 3.1.0 Installation and it works ✅

What does it do?

Loads the dashboard widget templates from the default theme, if they don't exist in the custom manager theme.

Why is it needed?

The documentation states that "The Manager will fall back to the default theme templates for any that have not been overridden." This is currently not the case for the dashboard widgets (that load a Smarty template).

How to test

* Create a new folder in `manager/templates` for a custom manager theme and change the system setting `manager_theme`.

* **DON'T** create copies of the files in `manager/templates/default/dashboard` in your own custom theme folder.

* Make sure the dashboard widgets get displayed on the manager welcome page.

Related issue(s)/PR(s)

Related topic in the MODX forum: https://community.modx.com/t/manager-theme-customization-problem/8261

What does it do?

Loads the dashboard widget templates from the default theme, if they don't exist in the custom manager theme.

Why is it needed?

The documentation states that "The Manager will fall back to the default theme templates for any that have not been overridden." This is currently not the case for the dashboard widgets (that load a Smarty template).

How to test

* Create a new folder in `manager/templates` for a custom manager theme and change the system setting `manager_theme`.

* **DON'T** create copies of the files in `manager/templates/default/dashboard` in your own custom theme folder.

* Make sure the dashboard widgets get displayed on the manager welcome page.

Related issue(s)/PR(s)

Related topic in the MODX forum: https://community.modx.com/t/manager-theme-customization-problem/8261

For me it’s ok.
The problem of the logo in the manager remains.
In header.tpl, on line 98 (<imgsrc="{$_config.manager_url}templates/{$_config.manager_theme}/images/modx-icon-color.svg" title="{$_config.site_name|strip_tags|escape}"> ) it would be enough to check if it exists or put the default one, or something similar.
I have no problems login.tpl in even though youy mentioned some

@opengeek opengeek merged commit 3c3f759 into modxcms:3.x Feb 14, 2025
7 checks passed
@modxcms modxcms deleted a comment from sentry-io bot Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/review-needed Pull request requires review and testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants