We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I can’t seem to get this to do anything useful at all (other than generate extremely weird fatal errors).

    Should a TV with the output set to
    @SELECT * FROM modx_site_content 
    produce something useful with a content tag -- [[*tv_name]] or does it require a widget or snippet for the output?
      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
    • Presuming that it works as the Evo version does, all it does is wrap an ordinary SELECT query. Its output would be the usual resource array result of such a query, so it would definitely need further processing.
        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
        Quote from: BobRay at Jun 06, 2009, 10:57 PM

        I can’t seem to get this to do anything useful at all (other than generate extremely weird fatal errors).

        Should a TV with the output set to
        @SELECT * FROM modx_site_content 
        produce something useful with a content tag -- [[*tv_name]] or does it require a widget or snippet for the output?
        You would use @SELECT as the input value and then an output widget (example delimited list) or a snippet...at least this is how i’ve used this in Evo wink
          [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]
          • 3749
          • 24,544 Posts
          Quote from: dev_cw at Jun 07, 2009, 03:21 PM

          Quote from: BobRay at Jun 06, 2009, 10:57 PM

          I can’t seem to get this to do anything useful at all (other than generate extremely weird fatal errors).

          Should a TV with the output set to
          @SELECT * FROM modx_site_content 
          produce something useful with a content tag -- [[*tv_name]] or does it require a widget or snippet for the output?
          You would use @SELECT as the input value and then an output widget (example delimited list) or a snippet...at least this is how i’ve used this in Evo  wink

          Thanks for the idea, but I was mainly wondering if there was a use that didn’t involve widgets or snippets.  smiley

          I’m not sure if the widgets will get translated to Revo. They’re definitely not available now. And, if you’re going to use a snippet, you might as well put the DB interaction in the snippet itself or the select statement in a property set.
            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
            • 28215
            • 4,149 Posts
            Quote from: BobRay at Jun 07, 2009, 11:26 PM

            I’m not sure if the widgets will get translated to Revo. They’re definitely not available now. And, if you’re going to use a snippet, you might as well put the DB interaction in the snippet itself or in a property set.
            Some of the widgets will; the absurd ones (ticker, marquee, etc) will not.

            The @SELECT binding may or may not stay; we’re still evaluating that. We most likely will keep it.
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • Quote from: BobRay at Jun 07, 2009, 11:26 PM

              I’m not sure if the widgets will get translated to Revo. They’re definitely not available now.
              huh The widgets we are going to maintain are definitely there in Revo; we’ve been using them for months on projects. You can also easily add your own custom widgets now, which has proven extremely useful, and will allow you to add back any of the missing ones you need.

              Quote from: BobRay at Jun 07, 2009, 11:26 PM

              And, if you’re going to use a snippet, you might as well put the DB interaction in the snippet itself or in a property set.
              Though it’s certainly valid to do that, the thing not too many MODx developers have gotten around to is separating snippets into those that retrieve data and those that visualize it; something I will be demonstrating in an upcoming add-on library where all snippets can directly return output, or save the data they retrieve into placeholders for use by other snippets (or plugins).

              Quote from: splittingred at Jun 07, 2009, 11:33 PM

              The @SELECT binding may or may not stay; we’re still evaluating that. We most likely will keep it.
              Though we will keep it, I will be recommending better ways to use it now that all tags can be evaluated in it.
                • 3749
                • 24,544 Posts
                Quote from: OpenGeek at Jun 07, 2009, 11:43 PM

                Quote from: BobRay at Jun 07, 2009, 11:26 PM

                I’m not sure if the widgets will get translated to Revo. They’re definitely not available now.
                huh The widgets we are going to maintain are definitely there in Revo; we’ve been using them for months on projects. You can also easily add your own custom widgets now, which has proven extremely useful, and will allow you to add back any of the missing ones you need.

                I hadn’t noticed assets/widgets. I think stumbling on that is the only way for the average person to know they’re there at present.

                This came up on top at Google when I checked for them: wink

                http://www.widgetbox.com/widget/modx-revolution

                Quote from: BobRay at Jun 07, 2009, 11:26 PM

                And, if you’re going to use a snippet, you might as well put the DB interaction in the snippet itself or the SELECT in a property set.
                Though it’s certainly valid to do that, the thing not too many MODx developers have gotten around to is separating snippets into those that retrieve data and those that visualize it; something I will be demonstrating in an upcoming add-on library where all snippets can directly return output, or save the data they retrieve into placeholders for use by other snippets (or plugins).

                Though we will keep it [@SELECT], I will be recommending better ways to use it now that all tags can be evaluated in it.


                I await that explanation and the library with bated breath. tongue
                  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