We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11773
    • 54 Posts
    I have set my suffixes to .html, which works fine on my parent pages if they have no children.

    However, when I add a child to a parent container, the parent page then loses its .html when I click on "preview document". For example, what should be www.mysite/page.html (and works fine when no child is added) is returned as www.mysite/page/

    It also does not return the page properly, seeming to lose it’s CSS defined styling.

    I’m sure that during the last week when I have been getting to grips with MODx this hasn’t been happening.

    Can anyone throw some light on this?
      • 20413
      • 2,877 Posts
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 36592
        • 970 Posts
        About suffix issue, you can do it with SEO Strict URLs plugin.
          • 11773
          • 54 Posts
          I am already using the SEO Strict URLs plugin. The only thing I did before this odd thing started happening was I moved some files around using the doc manager module - I moved the index container and then put it back to the top of the tree. Could this have affected things?

            • 36592
            • 970 Posts
            Check the setting of seoOverride TV of that container document if "Append Extension" is selected.
              • 11773
              • 54 Posts
              Ok, sounds like you;re on to something! I’m not sure what "seoOverride TV" is? I don’t have any Template Variables (at the bottom of the documetn it says, under Temaplte Variables, "No Template Variables found" ).

              Please can you elaborate as to what seoOveride TV and how I use it?

              Thank you in advance smiley
                • 36592
                • 970 Posts
                How did you install SEO Strict URLs plugin ?
                How did you configure it ?

                Here is some quotation from the plugin source...


                // On Install: Check the "OnWebPageInit" & "OnWebPagePrerender" boxes in the System Events tab.
                // Plugin configuration: &editDocLinks=Edit document links;int;1 &makeFolders=Rewrite containers as folders;int;1 &emptyFolders=Check for empty container when rewriting;int;0 &override=Enable manual overrides;int;0 &overrideTV=Override TV name;string;seoOverride

                // For overriding documents, create a new template variabe (TV) named seoOverride with the following options:
                // Input Type: DropDown List Menu
                // Input Option Values: Disabled==-1||Base Name==0||Append Extension==1||Folder==2
                // Default Value: -1

                I think you need to override documents when you want container documents to be expressed like "somealias.html".
                So as you can see, you have to make override TV and on the container document you have to set it as "Append Extension". And on plugin configuration, you have to set "Enable manual overrides" as "1" and specify the name of the override TV name.
                  • 11773
                  • 54 Posts
                  Thanks for your reply. I think SEO Strict URLs plugin was already installed, or if I installed it myself I must have partly followed instructions because it was already configured as you said. I have also set up a TV called seoOverride as set out in your email. I don’t know where the "Append Extension" bit is though?

                  Could someone please attach a screenshot showing me where the "Append Extension" tick box is? i’ve looked in both the TV and the container of the document in question, but can’t find it.

                  Thank you again! smiley
                    • 11773
                    • 54 Posts
                    Update:

                    I’ve just read through the SEO Strict URL instructions again. I have done eveything including the Overide TV setup bit, but this is what is happening:

                    - My parent pages are "losing" their suffix, ie: .html (this only happens when I add child pages to a parent. Before I add a child page the parent acts correctly and has its .html bit intact)
                    - My child pages have their suffixes intact - ie: child pages are all ok and performing as they should

                    So, this would suggest that my Strict URLs are working on my children pages, but not on my parent pages.

                    I really really need to resolve this as I am transferring my current static website to MODx and need the suffixes to stay the same. If I lose the ".html" bit then essentially my pages will all be different and will lose all of the inbound links etc that they have.

                    I greatly appreciate anyone that can through some light on this smiley
                      • 25663 MODX Staff
                      • 12,272 Posts
                      There is an option in the SEO Strict URL plugin to make container docs act that way exactly. I’m not familiar with the details but I know it’s there.
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me