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
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>
alrighty that’s an easy one... thanks a bunch.
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).
-
☆ 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.
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
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.