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

    Just a quick question: how do we delete old custom categories that we no longer use? I can’t find a place in the manager where I can handle that. undecided


    Thanks for the help in advance kiss
      "Don't waste your time or time will waste you"
      • 27708 MODX Staff
      • 2,502 Posts
      They should disappear if you have no resources using them. For instance, if you have a snippet in the category "old categrory" and chunk using "old category" the category won’t disappear until you change both resources to another category or to the blank field.

      Cheers,

      Jay
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        In Resources -> Manage Resources go to the Combined View tab and there will be (Delete) links next to each category name. If you delete a category with items, they will be dumped into the "uncategorized" category. If there’s nothing in the category, it won’t show on the list, but you can just assign something to it then delete the category and move the item back out of the "uncategorized" category.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 27708 MODX Staff
          • 2,502 Posts
          Sage Susan! I never noticed this before. I don’t use the combined view much.

          Cheers,

          Jay
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
            • 28825
            • 61 Posts
            Thanks Jay and Susan. That’s a pretty sneaky little trick there with the Combined View! laugh

            Jay, it would be awesome if the custom categories dropped out automatically if nothing was using them; that’s a very intuitive solution! But in the Resources-->Manage Resources section, I checked everything and nothing was using the defunct custom categories, yet they still appeared in the drop down list. I had to kill them via the Combined View trick...maybe something in my manager is screwy?

            Or on second thought....maybe ModX just retains those custom categories because it figures: "Hey just because something isn’t associated with anything right now, it developer may still use this in the future. If the person really wanted to delete the entire category, they would have eliminated it via the Combined View."
            So maybe the Combined View method isn’t really a trick at all but something that exists by design!

            Thanks for the all the help everyone. wink
              "Don't waste your time or time will waste you"
              • 27708 MODX Staff
              • 2,502 Posts
              I am not sure if it is a Cache problem or not. I just tested it. I created a chunk and a new category and when I deleted the chunk the category disappeared. BUT it does show up in the dropdown so it may be confusing for someone using the Manager.

              I think that they right way and complete way is the way Susan suggested.

              Cheers,

              Jay
                Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
                • 28825
                • 61 Posts
                Hey Jay, just edited my response as you were typing yours. laugh
                  "Don't waste your time or time will waste you"