We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44985
    • 27 Posts
    Hi all (and BobRay!)

    I tried modifying the template for the NewsPublisher snippet but I don't know what the parameter name is for any of the tpls. It would be great if somebody could point me to a resource coz I only found the wiki for Evo's version of NewsPublisher (http://wiki.modxcms.com/index.php/NewsPublisher).

    I just took a guess and used the name of the default chunk as the parameter name...but that didn't work. Here's my call that I tried for your info:
    [[!NewsPublisher? &npOuterTpl=`submissionFormOuterTpl`  &show=`pagetitle,performers,event,style,videographer,videoURL,country`]]



    • MODX Version: MODX Revolution 2.2.7-pl (traditional)
    • PHP Version: 5.3.24
    • Database MySQL Version: 5.5.30-cll
    • Formit Version: 2.2

    Sar

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

    [ed. note: sarahactivated last edited this post 13 years, 1 month ago.]
      ☆ Flag it! - Don't forget to "star" a reply if it's answered your question smiley
    • discuss.answer
      • 3749
      • 24,544 Posts
      Yes, I'm afraid these aren't very well documented. Basically, each property is the name of the chunk without the 'np' prefix:


      • errortpl
      • fielderrortpl
      • outertpl
      • datetpl
      • booltpl
      • listoutertpl
      • listoptiontpl
      • optionoutertpl
      • optiontpl
      • texttpl
      • textareatpl
      • inttpl
      • filetpl
      • imagetpl
      • fielderrortpl

      BTW, there's information on the Revo version here: http://bobsguides.com/newspublisher-tutorial.html [ed. note: BobRay last edited this post 13 years, 1 month ago.]
        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
        • 44985
        • 27 Posts
        Thanks Bob..

        I knew you'd come to my rescue!

        Sar
          ☆ Flag it! - Don't forget to "star" a reply if it's answered your question smiley
          • 3749
          • 24,544 Posts
          Don't thank me until it works. wink

          I haven't tested them lately.
            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
            • 44985
            • 27 Posts
            Quote from: BobRay at Sep 03, 2013, 11:28 PM
            Don't thank me until it works. wink

            I haven't tested them lately.

            Sorry! Yes I tested it just now and it works fine smiley Thanks for that.

            It's just that I created a Formit form according to my client's specs...and then I realized that NewsPublisher does a better job for what I need. So now I have to transfer the form style from Formit to NewsPublisher.

            Do you want me to post here again if a parameter doesn't work?

            Sar
              ☆ Flag it! - Don't forget to "star" a reply if it's answered your question smiley
              • 3749
              • 24,544 Posts
              Yes, if one of them doesn't work, let me know.

              BTW, a few of the tpls don't exist as chunks -- they're hard-coded into the NewsPublisher class file (around line 540). Creating a chunk and using the property should still work for them, but you might want to look in the file to see the original code.
                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