We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18961 ☆ A M B ☆
    • 237 Posts
    I just finally installed Revolution and I’m trying to setup something that I would think should be easy, but I just can’t seem to figure it out. I’m sure I’m just not reading directions correctly or finding the instructions for what I want to do. So, here’s what I want to happen, if someone could help me get on the right path, I would greatly appreciate it. Feel free to explain it to me like I’m an idiot..... wink

    I want to pull the content from the most recently added page that is added to a specific container. So, I have container called Magazine Issues with an id of 16. I put a page inside the container that now has the id of 17.

    I put the content in that page. I want that content to appear in a space on the home page. Just the content. Not the title, not the date... simply the content.

    This content will stay in place until a newer document is added to the Magazine Issues container. The newest info will now be in place on the home page because I would be pulling just the most recent page from my container.

    So, can some one walk me through setting this up?

    Any help would be greatly appreciated.

      Michael Smull
      http://www.bigpixelstudio.com
      twitter: @mdsdesign
      • 8609
      • 607 Posts
      Off the top of my head, I think this is what your snippet call would look like:

      [[!getResources? &parents=`16` &limit=`1` &tpl=`myTpl` &includeContent=`1`]]

      where the myTpl chunk contains:

      [[+content]]

      Hope I haven’t forgotten anything.
        • 18961 ☆ A M B ☆
        • 237 Posts
        Thanks for that quick response. That’s exactly what I tried and I just get a blank area. No output at all. I did recreate your template chunk and I pasted your call directly into my template.

        Could there be a problem with the actual getResources snippet?
          Michael Smull
          http://www.bigpixelstudio.com
          twitter: @mdsdesign
          • 8609
          • 607 Posts
          Did you clear the site cache after recreating the snippet call and chunk?

          What happens if you just call [[getResources]] with no arguments?
            • 18961 ☆ A M B ☆
            • 237 Posts
            Yes, I cleared the cache. Still nothing there.

            I called [[getResources]] as you suggested and got this:

            [2010-09-13 16:34:02] (ERROR @ /index.php) Error 42000 executing statement: Array ( [0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,17) AND (`modResource`.`context_key’ at line 1 )

            Well, I’m a designer, not a programmer and that doesn’t man anything to me.... But, looks like an error of some kind.

            Thoughts?
              Michael Smull
              http://www.bigpixelstudio.com
              twitter: @mdsdesign
              • 8609
              • 607 Posts
              hmm, definitely not the expected result. I suggest reinstalling the getResources snippet, you may have a corrupted package.
                • 18961 ☆ A M B ☆
                • 237 Posts
                I tried that once already and the same thing is occurring. Could it be my php/mysql install?
                  Michael Smull
                  http://www.bigpixelstudio.com
                  twitter: @mdsdesign
                  • 8609
                  • 607 Posts
                  I’m stumped on this one for now. Hopefully someone else can debug further. What’s your server environment? Apache, MySQL server and client, PHP? Knowing this might be helpful.
                    • 18961 ☆ A M B ☆
                    • 237 Posts
                    It’s Apache, MySQL PHP

                    I just force deleted getResource and downloaded it again. Same problem.

                    Any help here would be greatly appreciated. I’m think of doing this with Ditto but it doesn’t look like that is suggested.
                      Michael Smull
                      http://www.bigpixelstudio.com
                      twitter: @mdsdesign
                      • 8609
                      • 607 Posts
                      Quote from: mdsdesign at Sep 13, 2010, 04:02 PM

                      It’s Apache, MySQL PHP


                      Yes, but what are the version numbers for your Apache, MySQL client and server, and PHP?