Skip to content

Fix: Make search results and tree items display in consistent manner - #16958

Open
smg6511 wants to merge 2 commits into
modxcms:3.xfrom
smg6511:3.x-template-icons-tree-fix
Open

Fix: Make search results and tree items display in consistent manner#16958
smg6511 wants to merge 2 commits into
modxcms:3.xfrom
smg6511:3.x-template-icons-tree-fix

Conversation

@smg6511

@smg6511 smg6511 commented May 29, 2026

Copy link
Copy Markdown
Collaborator

What changed and why

Added status information to search result data and a new method to the front end XTemplate to match how the tree displays the various states of Resources and Elements. Some specific updates of interest:

  • Displays custom template icon when applicable
  • Displays folder when Resource is a container

Design Note

I only touched css minimally here, but will propose a number of style enhancements in a separate PR.

How to test

Test in an environment with many Resources and Elements, having various published/deleted/disabled states and compare the search display to the tree display. The two should match.

Note that some Extras override the tree icon (e.g., Collections, Gallery), but do not override the search one; that disconnect would need to be addressed by the relevant Extras’ maintainers.

Example Screenshots

On the left are a couple clips of my tree; on the right, a few search result examples showing various states. You can spot where specific ones match up.

search and tree

Related issue(s)/PR(s)

This is a different approach than and supersedes the proposed change in #16659.

Compatibility notes

n/a

Breaking change assessment

None

Test coverage

n/a

Contributors

n/a

AI tool use

n/a

smg6511 added 2 commits May 28, 2026 23:25
Adds status classes to items to make search result display consistent with the tree
Code quality fixes
@smg6511 smg6511 added the requires build Grunt build is required for integration label May 29, 2026
@smg6511
smg6511 requested review from Mark-H and opengeek as code owners May 29, 2026 03:46
@smg6511 smg6511 changed the title Fix: Make search results display consistent with the tree Fix: Make search results and tree items display in consistent manner May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires build Grunt build is required for integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant