processwire-issues icon indicating copy to clipboard operation
processwire-issues copied to clipboard

> icon in menus for Listers even though there are no submenu items

Open adrianbj opened this issue 7 months ago • 2 comments

I know I mentioned this many years ago, but I just had some users think things were broken because when you look at a Lister under the Pages menu, there is a > indicating that there are submenu items to be loaded. When you hover, PW starts the ajax spinner, but of course nothing is shown because there is nothing to show.

I am guessing it's an issue of DB performance (saving doing a child count before displaying the menu item), but surely in the case of Listers we know there are no children, and so the > can be removed?

adrianbj avatar May 30 '25 21:05 adrianbj

The submenu associated with the > icon shows any bookmarks that are configured for the Lister. More generically, I believe the icon appears for any Process module that has useNavJSON set to true in its module info, and the menu shows whatever the executeNavJSON() method returns, which is not necessarily child pages.

If you never create Lister bookmarks you could perhaps hide the icon with some custom CSS, adjusting the data-json URL to suit different Listers if you're using ListerPro:

.prnav a[data-json*='/page/lister/'] .pw-has-items-icon { display:none; }

Toutouwai avatar May 30 '25 22:05 Toutouwai

Hi @Toutouwai - of course, I had forgotten that bookmarks would appear there. I still really think that icon shouldn't be shown if there are no items to show.

Your CSS hack is a good idea (and obviously works, but you need to manually add a new data-json*= rule every time you add a new Lister - not the end of the world, but I still think this really needs to be handled by PW.

adrianbj avatar May 30 '25 23:05 adrianbj