Show Janitor button only on non default language page


On a multi-language website, I use the Janitor plugin to show a button to open a specific page depending on the choosed language, but I don’t need it on the default language page.

Do you know a way to hide the janitor field on the default language page ?
Maybe using the “when:” field option ?

The when field option only works with values from other fields, not any other conditions. A workaround could be to store a true/false value in a hidden field, depending on language. This hidden field could be filled either via a hook on page creation or via a model.

A less complicated option would be to hide the button via CSS and this plugin: GitHub - mullema/k3-panel-view-extended: Quick fix for some missing features in the panel

Hello Texnixe,

The CSS method does indeed seem to be the easiest.
I saw that the main “div” of the default language page (in Panel) has two data attributes that could be used to do the trick:

  • data-translation
  • data-translation-default

So, I think it is not necessary to use a plugin.

As always, your recommendation is the right one.

Even better, then!