We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31845
    • 3 Posts
    Hello

    I installed modx on my server.I have some php and HTML background so I understand the use of snippets and I think I am understanding the relationship between that and chunks or the purpose of them.But what I haven’t understood yet and would like to know if through this forum or if there is any more full documentation because I already went through the designers and editors guide and I still can’t understand (and yes it might sound dumb but...) the purpose of documents.Basically I would like to know once I have included the necessary code on my snippet and created a template with the desired HTML code that might call to it’s css and assign the template to the document, what do I do with the document, because if go to site->preview all i get is a new tab gets opened and browses the index page which i had already created before I even installed modx but anything else i create i don’t understand how am i going to put everything together or make it work once i have the necessary code in the right place? huh

    So basically if I can get any links to some very very step by step of how to put everything together I would appreciate it very much. Thank you.
      • 20289
      • 958 Posts
      All you have to do is to make a call statement inside the document ex: [snippetcall] for cached snippets or [!snippetcall!] for uncached one ,... see the documentation for snippets by the way.
        [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
        [td][Wiki] [Persian support forum]
        [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
        [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
        • 27708 MODX Staff
        • 2,502 Posts
        While I didn’t do this myself until recently, I would advise doing another/new install and where it asks about installing sample data, you should say yes. This will install MODx with most of the installed plugins used then you can look at all the code, chunks etc. to see how it all works together.

        Documents are content pages. These content pages need to be linked together somehow. They can be linked via the menu (which you can build using Wayfinder) or linked via HTML links (although there is a special form you can use for portability). If you have created a website before a document would be the equivilent of a page of content except the template is added by the parser just before it is rendered to the browser (not quite but for this point that is fine). There may not be any explicit documentation on this portion as it is a fairly basic concept. Don’t get hung up on the word document as it is just a name; think web page. In most cases your document will be content served to your visitors (though they can be used in other ways as well).

        As an example of a really basic website you will have a page called Main Home Page and one called About Filderfroodle these are both documents and for someone to get to see About Filderfroodle from the home page they will have to click on a link. As I mentioned above you can allow documents to be added to the menu if you are using Wayfinder or manually link from within content or both.

        I hope that this is what you were after.

        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
          • 30223
          • 1,010 Posts
          ... what do I do with the document, because if go to site->preview all i get is a new tab gets opened and browses the index page which i had already created before I even installed modx ...

          In understand from this that you already have an index.html file on your server, possibly in the same directory as you’ve installed MODx? And you probably have friendly urls set to yes. If this is so, delete the old html file.

          When you click on site->preview you may be seeing this old file instead of any MODx generated page. This is because MODx will generally only kick in if a regular file for the request does not exist.

            • 28042 ☆ A M B ☆
            • 24,524 Posts
            If you have an index.html or index.htm file, the web server will show that file before it will look at index.php files. It can be configured to use index.php first, though. But with MODx, you do not need an index.html file at all. It uses the index.php file as its starting point and generates the document requested by the browser.

            You can just rename your index.html file to index.old or something if you want to keep it around for some reason.
              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
              • 7231
              • 4,205 Posts
              I found that the MODx for beginners guide in the wiki helped understand the process.
              http://wiki.modxcms.com/index.php/Beginner%27s_Guide_to_MODx
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don't know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 31845
                • 3 Posts
                Thank you very much for all the suggestions, I really appreciate it.I will follow through every single one of them.
                  • 31845
                  • 3 Posts
                  Thank you very much I finally realized what was missing.The step by step from wikipedia was definitely very helpful thanks a lot everyone. smiley