Reverse behavior of "hide in menu" possible?

Hello everybody!
It’s a question of ideology, but the setting “ON” for a functionality which swiches something “OFF” for me looks quite irrational! A quick cursory glance at my webpage settings shows activated swiches for the “menu” and “published” states - but the first one indicates a negative information!
If I activate a switch, I like to activate (not deactivate) a function - that means: YES I want the page available in menus and YES I want to publish the page (or their opposites).
Therefore my question: Is there a quick and easy modification possible to change the behavior of the “hide in menu” switch? Out of the question: the caption text within the lexicas must then be changed too.
Thank you for your reply and greatings from Dresden (Saxonia, Germany):
ejomi

I think it’s good to mention that you’re referring to the toggles used in MODX3.

You can use extjs to change those options but i have no experience doing so, and if your not familiar with how MODX is build around extjs you probably want to stay away from altering things there. :smile:

I guess i would take it for granted but maybe there are others here that don’t agree with me.

The mentioned checkbox is also in all recent Revo versions (up to 2.7.3 at the date of publishing this).

I never really thought of this, but I see where you’re coming from. I don’t mind it this way either, though. Maybe think of it like the checkbox is activating a function: if the checkbox is set, activate function “Hide in Menus”. That way you get around your “false positive”.

1 Like

I could have misread than, if OP is referring to system settings than yes i’m wrong. I was referring to the buttons (In MODX 2.7.3< checkboxes and MODX 3 toggles) on the resource page.

No, I think we talk about the same thing then :wink: I just thought you where exclusively talking about MODX3, but what you mention there, is exactly what I meant:

Thank you all for your quick replies.

First - what does this mean:

Hmmf - I’m comming from Dresden, Germany - so what?
Back to substance:
Yes, I forgot to say that I’m talking about MODX V.2.7.2 and yes, I was referring to the checkboxes on the resource page (NOT system settings).
I’m not familiar with the data interchange between AJAX and SQL, but I think this can never be the target because other functions and plugins (e.g. wayfinder) are depending on the common, unaltered database informations.
So I assumed that there might be a possibility to change only the GUI to make the checkbox “unchecked” if the internal value is “true” and “checked” if internal value is “false” (and - of course - returns the values in the same way if the checkbox state was changed by user). The general MODX system settings can be left untouched, because the experienced administrator knows whats all about.
Finally its only a question of unambiguous feedback between the MODX GUI and the application (end-)user.
So - any ideas?
Have a nice day - yours: ejomi

Alright, you had me a bit confused there :wink: Guess it’s the weekend knocking on the door.

Ghehe what Vibedesign means is that he get’s your point, it’s an English/American expression ‘i see where you come from’ translates to ‘i see what you mean/i get your opinion’.

So we’re all back on track, we are talking about the checkboxes on the resource page.

As i said in my previous post you can alter these settings using the extjs template (example checkout the modext folder), but i would not really recommend it if you havent done anything like that before.

A second option is altering it using CSS, which is a safer solutions. I’m however not sure how i would alter the behaviour with just CSS.

To be honest i think it’s too much of a hassle but i get your point, if it’s a real dealbreaker than definately read into the docs available on how to extend and modify the manager. I unfortuantely don’t have a simple solution by hand.

Sorry, I didn’t mean to confuse you and by no means refer to your physical location with any jugdement! Like @niintek explained (thanks for that!) I just wanted to state that I get your point :slight_smile:

Thanks again to you all for your vigorous response.

This is really funny and I laughed a lot - yes: english was never my strongest advantage!! Ok - I understand now what you mean.

Yes, you’re right. I didn’t think that changing the manager template is so complex (I’m used to PHP with clear structures but JS - brrr!).
I will wait another couple of days for may be more ideas before I close this thread.
So long - have a nice day, yours: ejomi

1 Like

Hello again!
I didn’t give up yet! Found the possibility to invert the output behavior within /MODXROOT/manager/controllers/default/resource/update.class.php behind the comment /*register FC rules*/ (arround line 120).

  • Original display:
    $this->resourceArray['hidemenu'] = intval($this->resourceArray['hidemenu']) == 1 ? true : false;
  • Invers display (= my idea):
    $this->resourceArray['hidemenu'] = intval($this->resourceArray['hidemenu']) == 1 ? false : true;
    Unfortunately I could’nd find the junction/connector where the data are stored back into the DB. I guess it’s somewhere within the /MODXROOT/manager/assets/ext3/ext-all.js - but I’m not shure. It’s very hard to get through, because the code is minified.
    Does anybode know more?
    Thank you in advance for your reply(s):
    ejomi (Dresden, Germany = where I come from!)

I don’t know where that code is, but wanted to mention that if you do find a complete solution, you’ll have to do it all over again every time you upgrade MODX.

Thank you for your reply.

Yes, of course this risk always exists if somebody manipulates the core files and should therefore not be recommended!
I was just wondering if there could be a easy solution by just switching some variables or so.
Anyway I want to please the developers of MODX to think about that “irrational” behavior of the checkbox “hide for menu” as I described above.

Thank you all for your feedback - I mark this thread as “solved” (but it still is’nt).

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.