We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51382
    • 53 Posts
    2.4.2

    Hi. I need to pull info from 1 resource's tv's into a second, new resource.
    In the second resource I have a tv "otherID" which in theory I would only need to type in once and then have the remaining 7 tv field pre-populated with tag below, which would "automatically" generate them via fastField.


    Can anyone let me know what I'm doing wrong? The source code shows a blank field.

    [[#[[*otherID].tv.address]]

    This question has been answered by multiple community members. See the first response.

      • 4172
      • 5,888 Posts
      you are missing a ]

      [[#[[*otherID]].tv.address]] 
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 51382
        • 53 Posts
        Sorry that was a typo in the forum on my part.

        Any other reason that I wouldn't be able to get a tv to show up when I type the resource ID [[#[[*28]].tv.address]] into my tv, but not where I reference the [[#[[*otherID]].tv.address]]?
        • Are you trying to use that tag as the value of a TV?
            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
          • [[*28]] is meaningless in that context. [[*...]] is a TV or resource field value tag referring to the current resource. [[#28.whatever]] will return the value of "whatever" belonging to resource #28.
              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
              • 51382
              • 53 Posts
              Basically, I am trying to figure out why fastField works for pulling the Event Name in this instance, but doesn't when I reference a tv within the same resource.

              My aim is to only have to type in the resource id of another resource once and have it populate throughout another resource based off of the default values I will supply in each resource of the 2nd resource.

              I upload the wrong pictures. 1A and 2A are the updated ones. [ed. note: sa90y7sa last edited this post 8 years, 1 month ago.]
              • I still can't figure out what you are trying to do, but I strongly suspect you're going about it the hard way.
                  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
                  • 51382
                  • 53 Posts
                  Quote from: sottwell at Mar 30, 2016, 01:31 PM
                  I still can't figure out what you are trying to do, but I strongly suspect you're going about it the hard way.

                  I have an events page. I create a resource which is the full event description (its own page). I then need to create a second resource which posts a blurb of the event in a listing on the home page (via getPage). I also need to populate the microdata for the event at the same time.

                  -I create a resource and the id becomes 500

                  -I then create the second resource which has a bunch of tvs that are all pre-populated with fastField [[#000.myTV1]], [[#000.myTV2]] e.g. I have 7 of these.

                  Normally I have to replace the 000 with the newly created resource (500). How can I set it up, so that I only have to key in one "500" and have it populate in the remaining tvs.

                  In theory, to me, I would swap out the "500" from [[#500.myTV1]] and replace it with [[*otherID]], which is a tv that exists in the second resource.

                  Appreciate you trying to understand this. If it's still to convoluted, I can look into another way to get the result I want.

                  • I don't understand the need for the second page. If you have events, then the getPage (I use pdoTools so I would be using pdoPage) will get the event and all of its TVs that you want to display.
                      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
                      • 51382
                      • 53 Posts
                      Quote from: sottwell at Mar 30, 2016, 03:34 PM
                      I don't understand the need for the second page. If you have events, then the getPage (I use pdoTools so I would be using pdoPage) will get the event and all of its TVs that you want to display.

                      I have to expire the blurbs after the event date comes and goes, but still keep the event page active, so don't know how I can do that without creating a second resource.

                      I will play around with everything. I don't have much background, so it'll be a trial and error situation. Thanks for the help!