We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51534
    • 13 Posts
    Quote from: Bruno17 at Dec 12, 2015, 02:12 PM
    there are many ways to solve 'related' stuff.

    In your case, can't you just have a subfolder on each gym 'testimonials' with all the related testimonials like

    gyms
    -gym A
    --testimonials
    ---testimonial A 1
    ---testimonial A 2
    gym B
    --testimonials
    ---testimonial B 1
    ---testimonial B 2

    Thanks Bruno. I've considered this, but it's not a very clean solution, but will definitely use it as plan B if all else fails.

    Thanks!
      • 3749
      • 24,544 Posts
      What does this produce on pages with the TV set:

      <p>Studios: [[*related_studios]]</p>


      You should see the ID of the page (IDs of pages?) you want to pull in with getResources.
        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
        • 30585
        • 833 Posts
        Bob asked a question we should have from the start. Let's see what we get. I have a feeling that this ordeal is syntax related. I wonder if you have any errors in your log (Manage -> Reports -> Error Log). Perhaps we're using wrong names in some places.
          A MODx Fanatic
          • 51534
          • 13 Posts
          Quote from: BobRay at Dec 12, 2015, 04:45 PM
          What does this produce on pages with the TV set:

          <p>Studios: [[*related_studios]]</p>


          You should see the ID of the page (IDs of pages?) you want to pull in with getResources.

          Thanks Bob. Mmm. When I use [[*related_studios]] directly on the testimonials template it parses as the correct id (correct_studio id). But when I tested in a chunk that get's pulled in via a standard getResources call on the studios template, the TV doesn't parse at all, see code below, under the "read more" button. This explains why the &tvFilter isn't working sad

          studio template
          [[!getResources? &parents=`50` &tpl=`testimonials_home` &limit=`5` &sortdir=`DESC` &includeTVs=`1` &processTVs=`1` &includeContent=`1` &depth=`1` &sortby=`menuindex`]]


          testimonials_home chunk
          <div class="client-testimonial-box">
          	<div class="col-sm-4">
          		<img src="[[+tv.main_image]]" class="img-responsive">
          	</div><!-- end col -->
          	<div class="col-sm-7 col-sm-offset-1">
          		<h2>[[+pagetitle]]</h2>
          		<p class="quote">[[+introtext]]</p>
          		<a href="[[~[[+id]]]]"><span class="button">READ MORE </span></a>
          		<p>Related Studios Test:[[+tv.related_studios]]</p>
          	</div><!-- end col -->
          </div><!-- end client-testimonial-box -->


          Thanks!
            • 51534
            • 13 Posts
            Quote from: treigh at Dec 12, 2015, 05:00 PM
            Bob asked a question we should have from the start. Let's see what we get. I have a feeling that this ordeal is syntax related. I wonder if you have any errors in your log (Manage -> Reports -> Error Log). Perhaps we're using wrong names in some places.

            Thanks Treigh. No errors, but with Bob's question, at least we can see the TV wasn't even parsing...

            Thanks!
              • 3749
              • 24,544 Posts
              Million-dollar question: is the getResources tag itself in a chunk?
                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
                • 4172
                • 5,888 Posts
                Another suggestion:
                you could try to use Selections from Collections-Extra to pull the related testimonials in
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 51534
                  • 13 Posts
                  Quote from: BobRay at Dec 12, 2015, 11:11 PM
                  Million-dollar question: is the getResources tag itself in a chunk?

                  Hi Bob. No, the getResources tag itself is not in a chunk. Breakthrough though, I removed all the TVs and chunks and redid the getResources call and the [[+tv.related_studios]] in the chunk now successfully showing and it's the correct id. I'm referring to the testimonials_home chunk, 4 post above this one. However, when I add &tvFilter=`related_studios==[[*id]]` &includeTVList=`related_studios` to the getResources call all testimonials still show, and the main_image TV image disappears. So it must be the syntax...?

                  Thanks!
                    • 51534
                    • 13 Posts
                    Quote from: Bruno17 at Dec 13, 2015, 01:58 AM
                    Another suggestion:
                    you could try to use Selections from Collections-Extra to pull the related testimonials in

                    Thanks Bruno, let me give that a go and revert.
                      • 51534
                      • 13 Posts
                      Quote from: johnosmith at Dec 13, 2015, 06:52 AM
                      Quote from: Bruno17 at Dec 13, 2015, 01:58 AM
                      Another suggestion:
                      you could try to use Selections from Collections-Extra to pull the related testimonials in

                      Thanks Bruno, let me give that a go and revert.

                      I had a look and as far as I can see every time a new testimonial is added it will also have to be added to a selection container manually?

                      Thanks!