We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14198
    • 12 Posts
    I have tried unsuccessfully to get the "Beginner’s Guide to MODx" tutorial web site to functon as it appears in the
    wiki. Three times I tried, including reloading modx-096p1 and my database from scratch.
    It is getting my image and footer "chunk", but the [*content*], and menus are from the install page.

    I am still not exactly sure how Wayfinder works - I’ll have to do more research.
    "Chunks" seem to work fine. Though I don’t know that building a website from just "chunks" is a good thing sad
    Also, where does [*content*] get its "content" from ?
    Can I print these using php ? How ?

    I also get an error whenever I try to create a template variable: $rs not set! New variable not saved!

    Environment: Windows XP SP2, Apache 2.2.4, php 5.2.3 and MySQL 5.1.45

    Thanks,

    Jim
      Thanks,

      Jim

      Apache 2.2.15 | Firefox 3.6.8 | MODx Revolution 2.0.0-pl
      MySQL 5.1.47 | PHP 5.2.13 | x86_64 GNU/Linux
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      [*content*] comes from the content field of each document when you created it.

      Wayfinder goes through the site_content table of the database and sorts all the documents there as you see them in the Document Tree in the Manager. In fact, that’s basically what the Document Tree does, shows you how your site will be organized in the menu.

      So for each document that is publised and set to show in the menu and the user has permission to view, Wayfinder makes a link. Then when you go to that page in the menu, the content of the document is loaded wherever you put the [*content*] tags in your site’s template. All the other MODx tags you have in your template or in the content will also be added to the template.
        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
        [*content*] is a document variable and corresponds to the content field of the document being viewed. Each document has a predefined set of variables (page parts) that you can then use in the site template. One example is the page title [*pagetitle*] which you can use to set the title for each document.

        Here is a list of all of the document variable:
        http://www.modxcms.com/document-tvs.html

        Besides the predefined document variables you can also use Template Variables to define parts of dynamic content on your page. Template Variables (aka: TV) are a key part of MODx’s flexibility.
        http://www.modxcms.com/template-variables.html

        I also get an error whenever I try to create a template variable: $rs not set! New variable not saved!
        How are you setting the variable? All php needs to be inside a snippet.
          [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]
          • 14198
          • 12 Posts
          Thanks for th e responses. This should keep me busy for a while wink

          Jim
            Thanks,

            Jim

            Apache 2.2.15 | Firefox 3.6.8 | MODx Revolution 2.0.0-pl
            MySQL 5.1.47 | PHP 5.2.13 | x86_64 GNU/Linux
            • 7231
            • 4,205 Posts
            Just in case you missed it there is a similar question with some good info at this post:
            http://modxcms.com/forums/index.php/topic,22025.msg135922/topicseen.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't know what it is.
              Do you, Mr. Jones? - [bob dylan]