We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39535
    • 39 Posts
    Hi,

    I want to set 'hide in menu' property for some resources in Articles container but I didn't find checkbox for it (as for ordinary resources). Am I missing something or there is no way for doing it?

    Why do I need this? I want prevent these resources from showing on one page but show them on another.
    I know I can create custom TV 'hide one first page' but I would like to use build-in option.

    This question has been answered by BobRay. See the first response.

      • 39535
      • 39 Posts
      Anybody?
        • 39535
        • 39 Posts
        Still no?
        • discuss.answer
          • 3749
          • 24,544 Posts
          I don't know if there is a checkbox for that, but you could create a TV called HideMenu for it, then write a plugin that set it if the TV was set. The plugin would look like something like this (connected to OnDocFormSave):


          if($resource->get('class_key') == 'Article') {
          
             if ($resource->getTVValue('HideMenu')) {
                $resource->set('hidemenu', '1');
             }
          }
          
          return '';
          
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 39535
            • 39 Posts
            Thank you, Bob