We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14369
    • 19 Posts
    I must be totally stupid so I apoligise in advance for my dim questions.

    Installed Modx, looks like it is just what I want, I am a CSS and XHTML web whateverer, but my knowlege of anything backend is low.

    Here’s my idiotish question/s, once I have installed my template, uloaded my own image folder and stylesheets and selected the template to be current how do I then use that template to create other pages? And if I use [#content] then it only chucks in that one piece of content from the document list, if I wanted this:

    <div id="whatever">
    [#content] </div>
    <div id="whatever2">
    [#content]</div>

    then I have the same content in both boxes, how do I tell it which different piece of content to chuck in? Chunks seem to be what I would usually do with a php include, so it can’t be that, I don’t understand how to use (or even if) TVs aren’t meant to be used for editble content, so I stuck. Sorry for being stupid, any suggestions?
      • 4041
      • 788 Posts
      Best start point is taking a look through the documentation which should answer many of your initial questions, also another good resource is to do a demo install of MODx somewhere for reference and make sure you install the default content (checkbox at the top of one of the installer pages, this will allow you to see how the parts all mesh together).

      Welcome to the community smiley

      http://modxcms.com/documentation.html
        xforum
        http://frsbuilders.net (under construction) forum for evolution
        • 14369
        • 19 Posts
        Thanks for the reply, I did read most of the initial documentation, I think the demo install will be the best, however, I don’t think I checked that bit on install so I’ll have to restart the thing, is there a way to restore to the start or do I have to re-upload?
          • 4041
          • 788 Posts
          I actually like having a folder somewhere else that has a demo only version set up for reference purposes seperate from the active site. This way you can start the active site from scratch (basically no content) and look at the demo and copy/paste/reference the parts you need into your active site.

          To me that is the easiest way to come to grips with the way the system parts interact.
            xforum
            http://frsbuilders.net (under construction) forum for evolution
            • 7231
            • 4,205 Posts
            Each document only has one content field. To get additional content fields you need to use Template Variables (Custom Fields). Then you would have your template like this:

            <div id="whatever">
            [*#content*] </div>
            <div id="whatever2">
            [*#secondaryContent*]</div>
            This is assuming that you created a Template Variable (tv) with the name of secondaryContent.
              [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&#39;t know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 14369
              • 19 Posts
              Additonal content fields, makes sense! And having a demo at all times is also a good idea, I learnt CSS and XHTML by looking and things that were already done, so I don’t see why I can’t do it here too.

              I did try a TV, but there I guess you have to use @DOCUMENT with some kind of ID to ref the doc to the TV, right?

              Thanks for your answers.

                • 7231
                • 4,205 Posts
                I did try a TV, but there I guess you have to use @DOCUMENT with some kind of ID to ref the doc to the TV, right?
                NO. Only need the DOCUMENT binding if you want the TV to get the content from another document. Simply create a TV type "Textarea" and assign it to your template and presto it will be available in the content editor for the documents. You can have as many TVs as you need and you can have many different templates..so you can group the content filds according to sections of the website based on the templates that section uses.

                the @ bindings give TVs additional functions by binding them to an action. Very handy one is the @INHERIT binding that tells MODx to use the content from the parent document in the TV (great for sections that share common elements allowing you to only edit the parent and have all children follow).
                  [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&#39;t know what it is.
                  Do you, Mr. Jones? - [bob dylan]
                  • 14369
                  • 19 Posts
                  I’m making some progress, althoughI still feel like killing something!

                  So I’ve got the proccess now of using my template to create new pages by creating a new document, the [#content] calls in the individual content to each instance of the template - no worries, however, what is baking my noodle is this: I want to use my own menus, at the moment the menu is coded into the template, I know I can use chunks of whatever like a php include but I’m just trying to keep it simple to learn, certainly at the moment anyway, but I can’t nagivate to the pages I’ve created, they are all there and different if I preview them from the Modx panel, but I can’t access them from the menu on the site, is there any reason why I can’t use index.php?id=0 and so on as <a href></a>s in my menu, it doesn’t work so I guess there is a reason?!

                  any further thoughts and suggestions, I will try and get into the multiple content things later, but there’s no point if I can’t even sort this issue out.
                    • 7231
                    • 4,205 Posts
                    Link syntax in MODx is href="[~123~] where 123 is the document ID. This will automatically generate the link according to your site settings. If you are using Search Engine Friendly URLs then the link will use the alias, if not it will have the ?id=123 in the URL.

                    However, I encourage you to check out Wayfinder for you menus. It will automatically build the navigation based on the site tree structure. Check out the developers site for some documentation: http://www.muddydogpaws.com/development/wayfinder/features.html
                      [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&#39;t know what it is.
                      Do you, Mr. Jones? - [bob dylan]
                      • 3749
                      • 24,544 Posts

                      If you use the Wayfinder snippet (which should be in your template) to do your menus, all existing and new pages will automatically show up in the menu as long as the "published" box is checked. If they’re not published, you can right-click on them in the tree at the left and make them published. The minimal Wayfinder call should do it:

                      [[Wayfinder? &startId=`0`]]

                      Note that those are back-ticks, not quote marks around the zero (look on the ~ key). Trust me, you definitely want to use Wayfinder for your menus. It will take some configuring, but will save you endless hours in the future unless your site never changes.

                      You might find the site in my sig helpful in figuring out how MODx works.
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting