We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47562
    • 113 Posts
    TwitterX is working well using the default TwitterXTpl, but I was hoping to tweak the output a little; can anyone tell me where I might find some twitter tpl examples? Or for that matter, where I can find that default tpl?

    BTW, one of the few issues I have found with the otherwise fantastic ModX system is the somewhat sparse use of real-life examples in the documentation. I think this makes it especially tough for folks new to using the tool to get up to speed without feeling like a goof. But that's just a FWIW - please don't take it as too severe a criticism...

    Cheers!

    This question has been answered by absent42. See the first response.

      • 3749
      • 24,544 Posts
      The TwitterXTpl.html file should be in the core/components/twitterx/elements/chunks/ directory, but you should have chunk named TwitterXTpl in the chunks section of the Elements tree in the Manager (possibly in the TwitterX category). The chunk is what is actually used by TwitterX.

      To fool with it, (assuming that the chunk is there), just duplicate the chunk, call the duplicate MyTwitterXTpl, edit it, and use this property in the TwitterX snippet tag:

      &chunk=`MyTwitterXTpl`


      Be sure to use back-ticks, not single quotes around the property value.

      The chunk is not all that complicated, and with a little trial and error, you should be able to see how to modify it. It's just some HTML with placeholders.
        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
        • 47562
        • 113 Posts
        Quote from: BobRay at Jun 22, 2014, 12:43 AM
        The TwitterXTpl.html file should be in the core/components/twitterx/elements/chunks/ directory, but you should have chunk named TwitterXTpl in the chunks section of the Elements tree in the Manager (possibly in the TwitterX category). The chunk is what is actually used by TwitterX.

        Hey Bob.

        Thanks for the info. If I can somehow find that file, I'm sure I'll be able to tinker with it; it's finding it that's the problem. smiley

        My core/components/twitterx directory just has subdirectories docs and twitteroauth; no elements.

        I did a search through the entire installation, case insensitive, both for "*tpl" and "twitter*". In the list of tpl files, nothing twitter related shows up, and for the list of files beginning with "twitter", absolutely nothing shows up. Have I gone completely off the deep end? smiley
        • discuss.answer
          • 42046
          • 436 Posts
          can anyone tell me where I might find some twitter tpl examples? Or for that matter, where I can find that default tpl?

          It's in the Elements tree in Chunks>>TwitterX
            • 47562
            • 113 Posts
            Quote from: absent42 at Jun 22, 2014, 02:02 PM

            It's in the Elements tree in Chunks>>TwitterX

            Oh man! I'm such a weenie. Thanks, Dan; don't know how I sometimes miss the obvious... smiley
              • 42046
              • 436 Posts
              No problem. The author's page contains all the tpl options too: http://www.qodo.co.uk/blog/twitterx-a-new-modx-extra-for-pulling-in-twitter-feeds-using-api-1.1/
                • 3749
                • 24,544 Posts
                My mistake, really. I shouldn't have even mentioned the file. wink
                  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
                  • 47562
                  • 113 Posts
                  Quote from: BobRay at Jun 23, 2014, 12:03 AM
                  My mistake, really. I shouldn't have even mentioned the file. wink

                  Unfortunately, I tend to look to files, and completely missed the fact that this should be found in the DB... smiley