We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24881
    • 4 Posts
    Newbie here, never used Evo, now have Revo 2.0 installed. I’m trying to create a page for my client to create and edit coupons. The main page will allow for up to 4 coupons. I’ve created 4 pages, coupon 1, 2, 3 & 4. Created a main page called coupons, with a table to lay them out on the page nicely. Now, I am trying to insert into each td the results of one of the coupon pages. I’ve tried, chunks, snippets, and get resources. I really don’t understand the parameters of them I guess. I get a blank result when using the following parameters in the get resources snippet...
    <table><tr><td>[[getResources? &tpl=`coupons` &limit=`1` &parents=`20` &includeContent=`0` &includeTVs=`1` &showHidden=`1` &processTVs=`1` &resources=`8,9,10,21`]]</td><td>[[$coupons@Coupon 2?]]</td></tr>
    <tr><td>[[$coupons@Coupon 3?]]</td><td>[[$coupons@Coupon 4?]]</td></tr></table>
    As you can see in the other td item,s I’m trying everything...but all the fields still come up blank....
    Am I going about this completely wrong? I just want the results from document 8,9,10 & 21 to show up on document 21 in the table fields. Is this possible?

    Thanks in advance for any help! sad huh :’(
      • 24881
      • 4 Posts
      So I tried another time with the getresource snippet in the table fields....here are the parameters of the snippet...
      [getResources? &tpl=`coupons` &limit=`1` &includeContent=`1` &includeTVs=`1` &showHidden=`1` &processTVs=`1` &resources=`21`]]
      I’m trying get the results & tv’s from document 21 to show in this field...but
      this time the final page outputs the following error...
      2010-09-02 15:30:03] (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,5,20,4,10,9,21,8) AND (`modResource`.`context_key` IN (’web’) OR EXISTS(SE’ at line 1 )
        • 1778
        • 659 Posts
        Hello

        Why don’t you create 4 TVs (instead of 4 pages), let say Coupon1Tv, Coupon2Tv, Coupon3Tv, Coupon4Tv, and in your main page you can then do :

        <table>
          <tr>
            <td>[[*Coupon1Tv]]</td>
            <td>[[*Coupon2Tv]]</td>
            <td>[[*Coupon3Tv]]</td>
            <td>[[*Coupon4Tv]]</td>
          </tr>
        </table>
        


        Hope this helps...
        Cheers
          • 24881
          • 4 Posts
          Well, I tried to create 4 tvs, problem is each one needs to have multiple fields that my client can edit, for example, the title...the coupon discount amount, an image, etc. So I though maybe add a property set to each tv. Did that, inserted each tv into one of the td...but my page displays blank huh A view source shows empty td fields....I’m lost now....
            • 1169
            • 312 Posts
            Are the number of multiple fields constant in general?

            If yes you could create more TV’s
            eg.

            Coupon1TitleTV
            Coupon1DiscountTV
            Coupon1ImageTV
            etc

            then
            Coupon2TitleTV
            Coupon2DiscountTV
            Coupon2ImageTV

            You get the Idea.

            Hope this helps.

            Welcome to MODx.
              DEVELOPMENT ENV:- Ubuntu 12.04 | MODx Revolution 2.2.8 | LAMP 2i Apache 2.2.22 | Php 5.3.10 | Mysql 5.5.31 MySQL client version: 5.5.31