We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3767
    • 40 Posts
    Quote from: sottwell at Jan 29, 2007, 09:29 AM

    Ok, I see the problem. introMessage is not a snippet argument. You have to edit the snippet code at this point:
     // $introMessage [ string ]
       // This is the text that will show up if the person arrives
       // at the search page without having done a search first.
       // You can leave this as an empty string if you like.
       $introMessage = '';
    


    How do you know which one is a parameter, and when you have too edit the snippet code?
      • 25663 MODX Staff
      • 12,272 Posts
      Parameters are typically accompanied by code along the lines of:

      $aParam = isset($aParam)? $aParam : 'default parameter value';
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 33372
        • 1,611 Posts
        I was just writing that also...

        So that means that if you changed

        $introMessage = ’’;

        to

        $introMessage = isset($introMessage) ? $introMessage : ’’;

        you could set its value in the snippet call just like any other parameter.
          "Things are not what they appear to be; nor are they otherwise." - Buddha

          "Well, gee, Buddha - that wasn't very helpful..." - ZAP

          Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
          • 27376
          • 576 Posts
          Quote from: ZAP at Jan 29, 2007, 04:06 PM

          So that means that if you changed

          $introMessage = ’’;

          to

          $introMessage = isset($introMessage) ? $introMessage : ’’;

          you could set its value in the snippet call just like any other parameter.
          Correct. Each parameter is case sensitive, so make sure they are all the same letter case.
            • 3767
            • 40 Posts
            k, thanks

            So you guys know, I am going to learn this stuff and then write some documentation that makes some damn sense. Theres way too much assumptive writing in here. I mean, yeah, I guess I should know some more PHP or something, but crikey, all this stuff asssumes you not only know PHP, but MODx as well. Just because you tell me to put a chunk in somewhere, doesnt mean I know wtf a chunk is, let alone what the parameters of that chunk entail.

            I know its mainly my fault, but without well done documentation, people arent going to adopt this. Then again, here I am struggling to make a page work in MODx, when I could just do it the normal way. Maybe I dont even need a CMS. The main point is that I wanted a good integrated blog into my page. Maybe I should just stick with my blogger.com template, that was already working decently well. And maybe Ill mess around with this, THEN transfer my site over to MODx once I know what the hell is going on. embarrassed :’(
              • 25663 MODX Staff
              • 12,272 Posts
              Mass adoption honestly isn’t our goal right now. Patient, experienced developers are really our target, though we REALLY appreciate it when folks like yourself come along and are properly motivated to help us with the documentation effort. smiley See my signature for more details, and we WILL get there soon enough. I predict 2007 is going to be a very interesting year for the entire MODx ecosystem.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 33372
                • 1,611 Posts
                MODx is not blogger.com, and the AjaxSearch snippet is currently undergoing a major overhaul, so you’re going to need to have some patience and apply a little mental elbow grease if this is the first time you’ve set up a MODx site. A whole lot of useful info can be found here in the forums, much of it in the form of examples rather than step-by-step instructions. I count five days since your first post, so it doesn’t seem to me as if you’re doing all that badly.
                  "Things are not what they appear to be; nor are they otherwise." - Buddha

                  "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                  Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                  • 3767
                  • 40 Posts
                  Quote from: ZAP at Jan 30, 2007, 12:36 PM

                  MODx is not blogger.com, and the AjaxSearch snippet is currently undergoing a major overhaul, so you’re going to need to have some patience and apply a little mental elbow grease if this is the first time you’ve set up a MODx site. A whole lot of useful info can be found here in the forums, much of it in the form of examples rather than step-by-step instructions. I count five days since your first post, so it doesn’t seem to me as if you’re doing all that badly.

                  I didnt mean to make a comparison to it outside of the sense that maybe its a better idea for me to use blogger, since it is much, much easier to impliment that blog into my pages then building one semi-ground up with Ditto, Jot and Breadcrumbs. Maybe its just TOO powerful and flexible for me wink

                  Heres an example of a documentation problem:

                  http://modxcms.com/ditto_documentation.html

                  Look under the pagination call (I dont know what that is for the record, lol), but in the example it puts forth a paramerter &multilevel=`1`, cool whats that? Oh, lets go look at

                  http://modxcms.com/ditto_parameters.html

                  hmm, its not listed. Maybe its some sort of general parameter for snippets. Lets use the Site search. Ok, I get back a bunch of pages, all which just show &multilevel=`1` in their calls, but no description of the parameter.

                  So I search the forum, and find a bunch of posts with &multilevel in it’s contexts, usually just in the code tag, and most of them arent referencing it specifically except in one case which makes me believe it has something to do with displaying things one on top of each other. How I would use it, I dunno. It would result in me having to post on the forums...which I dont like doing if I dont have to (and why I have confined my posts to mainly this thread)

                  Now, this was just a random thing I found, not that I am looking to use multilevel, I just wanted to show what I mean about the unintuitive nature of things. Not to mention that you guys have some outdated tutorials (like the blog one where the snippet names have changed). And I know you guys said you are targeting patient developers, but coming from someone who is at least technically inclined, and not really completely stupid (I dont think), it still seems like the documentation is written more for people who already know how to use MODx. Then again, I have imported my site into MODx in the past few days and at least got it up and running with wayfinder working, ajaxsearch (to an extent), and Ditto halfassed, so maybe the documentation isnt too horrible. laugh

                  I am just rambling, and think its because I can see the potential, I just cant utilize it.
                    • 25663 MODX Staff
                    • 12,272 Posts
                    :D For under a week, you’re definitely doing just fine. I think when it all starts to really click, you’ll be simply amazed. And there’s actually a lot more potential than you’ve remotely touched. smiley
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 33372
                      • 1,611 Posts
                      Your point about improving the documentation is well-taken, as is your comment about some tutorials being out-of-date. It seems to me that MODx is going through some very rapid evolutionary changes (0.9.5 made 0.9.2 obsolete, 0.9.7 promises to do the same to 0.9.5, and not too far on the horizon is 1.0) and that the documentation has been struggling to keep up. I don’t think that Ditto, Jot, or WayFinder even existed until about six months or so ago, and they’ve each gone through who-knows-how-many revisions since then.
                        "Things are not what they appear to be; nor are they otherwise." - Buddha

                        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options