We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23183
    • 102 Posts
    Ive decided to delete a part of my site to focus on other areas. Its a parent document which features in the main menu and has about 30 child documents.

    Whats the best way to go about doing this?

    If I delete the parent document do all childs delete aswell?

    Should I set up a redirect for google? If so where should I rediect to as the page is not getting moved its been delted.

    Im thinking of crteating a new page explainging that the page is no longer available and linking back to the homepage and redirecting any deleted page to this, would this suffice?

    Sorry for another noob questiosn embarrassed
      • 26016
      • 561 Posts
      Yes, if you delete a "root", the docs under it will be deleted. It gives you a warning to this effect, I think. Another REALLY handy warning MODx gives you is when you delete a template - if there are still docs attached to it, it gives you a pretty clear warning, and if I recall, maybe it even doesn’t allow the delete. This saved my bacon once or twice.

      Since your section is being deleted, no particular redirect is needed, I suppose. If you have a functioning 404 page, then this could suffice, unless you want to give a specific message about that page, in which case you could keep that one page with an appropriate message. The 404 would be enough for me.

      I’m not sure about the SEO, but I would think that sites delete content all the time, so Google must be OK at adapting to 404’s.
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 23183
        • 102 Posts
        Thanks for the rply Samba thats great.

        The 404 thing is something Ive got on the bottom of my ’to do’ list, but as its been bought up, how do I create a custom 404 and how do I know what my current one is? If I try and go to a page on my site that does not exist, the hompage is shown
          • 26016
          • 561 Posts
          Hey Phil,
          Fortunately, in MODx this is dead easy! Just make a new page with whatever text you want in it, using an appropriate template. Be sure to uncheck "show in menu". Save, taking notice of the number of the document after it’s saved. Then Tools... Configuration.... Site tab, and look for Error page. Put the document number here.

          The stock MODx install’s example site has a 404 page in it. I know that many like to have a cleaner install, so they don’t include the example site when installing. I do keep it, because this gives me handy stuff in case I need it. For instance, I don’t like setting up MODx’s funky Ditto blog thing, so if someone actually wants it, it’s there. Same with RSS feed and maybe two or three other things. I just usually keep all that in a non-menu folder so that if the client suddenly mentions that they want something like that, I have some handy pages, code, and chunks for it. I can always trash it later when they’re going live or what-have-you.

          Cheers, Dave

            MODx and Wordpress development
            Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
            • 23183
            • 102 Posts
            Brilliant, thanks Dave smiley