We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13219
    • 19 Posts
    where can I change the id of a document? I started with a few test pages, but now I am ready for the main index, and I need to set the page id to 1, I have looked everywhere, but I can’t find this option!

    thank you
      • 19164
      • 1,215 Posts
      Just change ID of your site start page in Tools/Configuration.
        DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

        Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

        [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
        • 13219
        • 19 Posts
        umm, yeah, I was trying to avoid that, cause I want to change id’s of other pages too..
        I guess there isn’t a way to change document id’s looks like!
        I am new to modx, so I still have some dumb questions,...here is another one:
        How does linking work? I know all the pages/folders in the menu are linked, but what if I link out of the site or to a page not in the menu. I am just using ’<a href="index.php?id=8">’ for example.
        is that enough? I feel lke I am missing something..
          • 33337
          • 3,975 Posts
          For linking use: [~123~] where 123 will be your document id.

          The document IDs cannot be changed without extra database work, and if you are new to databases, don’t do it or you will mess up the things.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 26435
            • 1,193 Posts
            The documents ID is an AUTO INCREMENT field in the database. It is automatically assigned the next available number when the document is created in the manager. In order to change the ID, you would have to manually change it in the database (using phpMyAdmin or the like), but I would strongly advise against that as it will interfere with document retrieval and even worse, it could potentially affect your ability to create new documents.

            To get a document’s ID in the content or in a chunk, you can use [*id*] for the current page. If you want to make a link the current page, like to an anchor in the page, you could use
            <a href="[~[*id*]~]#anchorName">Go to the anchor</a>


            As Zi said, you can make a link out of any document if you know using it’s ID. To link to the default site start you could use [~1~] as it’s document id in the default content is 1.

            Perhaps you could elaborate on why you want to change the ID number for a document. An explanation would help us understand your needs and then be able to provide you with a more specific answer.

            -sD-
            Dr. Scotty Delicious, Scientis.
              Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
              All of the above... in no specific order.


              I send pointless little messages
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Quote from: Dr. at Aug 04, 2007, 08:43 PM


              As Zi said, you can make a link out of any document if you know using it’s ID. To link to the default site start you could use [~1~] as it’s document id in the default content is 1.
              derstand your needs and then be able to provide you with a more specific answer.

              -sD-
              Dr. Scotty Delicious, Scientis.

              Wouldn’t [~[(site_start)]~] be better for linking to the home page if it’s not document #1?
                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
                • 26435
                • 1,193 Posts
                Quote from: sottwell at Aug 05, 2007, 05:04 AM

                Wouldn’t [~[(site_start)]~] be better for linking to the home page if it’s not document #1?

                That’s not the point.
                The point is in the default install with example data the document set to site start is "1". I chose to use that as an example so mr. itz could follow along. trying to avoid confusion here, not add more.

                -sD-
                Dr. Scotty Delicious, Scientist.
                  Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                  All of the above... in no specific order.


                  I send pointless little messages
                  • 36592
                  • 970 Posts
                  How about using ReplacePage module ?
                  http://www.modxcms.com/ReplacePage-702.html

                  I don’t know if it works with the latest version of MODx though...
                    • 13219
                    • 19 Posts
                    thank you all very much for your input! I understand better now how those id’s work, I will not mess with changing the id’s. No big deal, I am just beginning!

                    I am working on a member site, that has some of the content in the non-member area. Is it possible to have ’google friendly url’s’ turned on only in the non-member area? I doubt it, since it seems to be a global setting, but I just wanna ask, to be sure, perhaps there is a trick!?

                    gracias!
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      It is a global setting, but you can have it just use the document ID if you don’t set an alias for the document (mysite.com/123.html instead of mysite.com/privatepage.html)
                        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