We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7291
    • 129 Posts
    Got a little dilemma... would like ditto to bring up the summary text field and long title for the news article...no problem.

    Now I’m looking (in the same Ditto call) into giving customers the option of downloading a PDF version of the news article (on the page showing Ditto results...)

    I haven’t really got into TVs yet but is this a good time for me to start...can it be done with Ditto+TVs?

    Alternatively is it possible to call the PDF image with unique link in each documents summary text field or something along those lines?

    My server crashed so I can’t really experiment for a few hours and thought I’d come to the forums for some advice...

    Have a good one,
    Derek
      [center]-- smiley --[/center]
      [center]New View Media - Custom Website Design[/center]
      [center]Custom Website Design & Marketing = Strategic Business![/center]
      • 10449
      • 956 Posts
      Does every article (modx page) have a corresponding PDF? Or do you want to create those PDFs dynamically (via some PDF-PHP library) on each request?

      If you upload a PDF for each article, the easiest thing to do is to create a TV and just include this in your custom Ditto template as a link.
      e.g. <a href="[*pdfArticle*]">Download PDF</a>
        • 7291
        • 129 Posts
        alrighty that’s an easy one... thanks a bunch.
          [center]-- smiley --[/center]
          [center]New View Media - Custom Website Design[/center]
          [center]Custom Website Design & Marketing = Strategic Business![/center]
          • 31227
          • 198 Posts
          Quote from: ganeshXL at Apr 14, 2008, 06:31 AM

          Does every article (modx page) have a corresponding PDF? Or do you want to create those PDFs dynamically (via some PDF-PHP library) on each request?

          If you upload a PDF for each article, the easiest thing to do is to create a TV and just include this in your custom Ditto template as a link.
          e.g. <a href="[*pdfArticle*]">Download PDF</a>

          I found this interesting but how does [*pdfArticle*] work? how does it find the correct link to the pdf file or does ditto have inbuild capabilities of pdf generation (not that I am aware of any).
            Pure MODx sites
            Viriko.ru & Viriko.com - Multilingual and running on 1 MODx
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            That’s just a TV that gets filled in with the path to the file for each document.

            Be careful, [*TVName*] in a Ditto template will return the value for the document with the ditto call on it, while [+TVname+] will return the value for the document being processed.
              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
              • 31227
              • 198 Posts
              Quote from: sottwell at Jul 26, 2008, 01:18 AM

              That’s just a TV that gets filled in with the path to the file for each document.

              Be careful, [*TVName*] in a Ditto template will return the value for the document with the ditto call on it, while [+TVname+] will return the value for the document being processed.
              Thanks for the clarification
                Pure MODx sites
                Viriko.ru & Viriko.com - Multilingual and running on 1 MODx
                • 4749
                • 623 Posts
                I could probably use this approach for a current site. Thanks Susan, you always point out the little things that usually get me.

                [* *] vs. [+ +] - It’s just about driven me insane a few times.
                  The MODx has you...
                  Utah Web Design