Open revansx opened 11 months ago
It's not possible to use LocalSettings config in the layout XML file. Within a component's PHP you can access that, but that would be a very roundabout way to override a component when the simplest solution is to not have the component in the first place.
Have you considered using a custom layout file based on Clean.xml
but without that line? (i.e. instead of modifying the layout in the skin directory). I suppose the documentation isn't very clear about how to do this:
https://github.com/ProfessionalWiki/chameleon/blob/master/docs/customization.md#layout-of-page-elements
Basically, copy Clean.xml
outside the skin directory and reference that instead:
$egChameleonLayoutFile= __DIR__ . '/somewhere/else/Clean.xml';
(Path relative to LocalSettings)
My project doesn't allow me to develop custom code on the server that must be maintained separately from the components we use from git. So I can only use whatever configure options a components offers.
That said, what is the point of denying the navbar to users who simply can't edit? Is that intentional? Does it even make sense to have that behavior?
Would you be open to just removing that line from the clean layout in git so that users without the edit right can login from the clean layout?
Thanks! /Rich
Have you tried fixedhead.xml
instead? It is basically the same as clean.xml
but without the ShowOnlyFor
modifications.
I believe clean.xml
was created specifically to get rid of everything (for whatever purpose), although that was 9 years ago and long before my involvement.
indeed! thank you!!
I use the
Clean.xml
(chameleon v4.2.1) as the default skin on a private wiki, however, because of [1] unregistered users who aren't yet logged-in don't get to see the horizontal Navbar at the top and - as a result - are not shown theSpecial:Login
link in the top-right .. it only shows for registered users.I have been able to obtain the desired behavior by deleting line 29 in
layouts/cean.xml
[1].<modification type="ShowOnlyFor" permission="edit"/>
Would it be possible to add a new configuration variable in LocalSettings like:
$egChameleonAlwaysShowNavbar = 'true';
that would wrap that line in an if-then statement making this behavior a configurable option?
Thanks! /Rich
[1] https://github.com/ProfessionalWiki/chameleon/blob/d2da6b498eca0f75f188103a4a1e67416e8e250f/layouts/clean.xml#L29C52-L29C55