[TYPO3-templavoila] pdf print link
Steffen Kamper
info at sk-typo3.de
Mon Nov 10 14:16:06 CET 2008
Hi Dmitry,
Dmitry Dulepov schrieb:
> Hi!
>
> Steffen Kamper wrote:
>> Does anybody knows a way how to do this? In TO there is the child "pdf
>> version", so i thought calling page with &print=2 should do, but then no
>> userfunc is in there, any ideas?
>
> As you know I am slow today, so I could misunderstand your question.
> Sorry if I do :D
>
you don't - and i didn't recognized that, so i'ts only your subjective
feeling ;-)
> I used pdf_generator2 (I think this was the extkey). If I remember
> correctly, you had to pass a different typeNum to the URL. Different
> typeNum selected a different page type with different userFunc. It
> worked ok for me some time ago. You definitely cannot make TV do
> generate PDF because TV can only generate HTML. To make PDFs, it
> must be a separate userFunc from pdf_generator.
>
> I do not know/remember why there is a separate rendering type there.
> Probably PDF generator uses it in some way.
>
> If you want to try that TO from the URL, it is easy. It is similar
> to using print=1 for print version and only a bit trickier.
>
> "print=1" is hard-coded in TV and corresponds to rendering type
> 'print'. To use your own type you need to do this in TS:
>
> [globalVar = GP:print = 2]
> page.10.childTemplate = 2
> [global]
>
> "2" in the condition can be anything else. You can even have
> "display=pdf" or "render=pdf", just change the condition
> appropriately. "2" in the "childTemplate=2" should correspond to the
> value from pdf generator. I do not remember what it is but you can
> easily find it using FireBug. "2" is not a uid! "2" is a rendering
> type from select box ("value" of the <option> tag).
>
thx. I will try it with normal pdf_generator2. i found an extension (the
mentioned) that integrate the childtemplate for TV, so you have a new
entry for pdf. So i thought it's the most easy way to do it with TV.
I didn't looked to the source, but now i understand that print=1 is used
to use the childTemplate. Maybe it's enough, as i have now a second
childTemplate beside the normal print where i selected the second
childtemplate (pdf) and i only missed to pass a type - it's not
mentioned in the manual.
I will report if my tries are successful, thx again for your ever
present support!
vg Steffen
More information about the TYPO3-project-templavoila
mailing list