We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44295
    • 8 Posts
    Newbie question here. Digressing, BobRay helped me with my last question. I felt kinda honored as our office had just purchased his book. smiley

    So here's the scenario...

    We have a TV that is editable and displaying on template A.
    We want the TV to also display on pages created with template B--much like a server-side include.
    Obviously it won't show up by simply using the MODX code to call a TV.
    Tried to use this code, but it isn't working (probably because I am new to MODX)...

    [[getResourceField? &id=`1` &isTV=`7` &processTV=`7`]]


    We have one way of create server-side include like files, by creating an HTML fragment file in assets and calling it with a snippet that returns file_get_contents(). It works, but we don't want our users to be editing HTML. We want them to modify a TV on template A with rich text and have it cascade to the rest of the site automatically.

    I had thought that getResourceField would work. Is my code incorrect or my understanding off-base?

    Any help would be appreciated. [ed. note: zensmile last edited this post 13 years, 1 month ago.]
      • 42046
      • 436 Posts
      You could use Bob's ShowTV snippet: http://bobsguides.com/showtv-tutorial.html
        • 37105
        • 194 Posts
        Maybe the extra ClientConfig [ http://modx.com/extras/package/clientconfig ] will be an option? Can be handy for editors to edit some information that can be called anywhere in any template. So no dependancy needed in templates.
          Codeplaza Webdesign: for professional websites at low cost
          • 35150 ☆ A M B ☆
          • 191 Posts
          You need to use the &field property to give it the name of the TV you want, like this:
          [[getResourceField? &id=`13` &field=`someTVname` &isTV=`1` &processTV=`1`]]
            Extras :: pThumb • Resizer • imageSlim • setPlaceholders
            • 44295
            • 8 Posts
            Thank all of you for your help. Bob's ShowTV was the easiest and exactly what I was looking for! Thank you, thank you. And thank you BobRay for writing the tutorial. smiley