DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
Add a link in your Typoscript Template using makePdfLinkΒΆ
To add a link to the pdf page you can wrap any content element in a link using stdwrap.postUserFunc. The following code gives some examples:
[...]
temp.PdfI = IMAGE
temp.PdfI{
file = fileadmin/images/file_Pdf.gif
stdWrap.postUserFunc = tx_pdfcreator2->makePdfLink
stdWrap.postUserFunc.target =_blank
stdWrap.postUserFunc.no_user_int = 0
}
[...]
[...]
temp.PdfT = TEXT
temp.PdfT{
value = pdf
postUserFunc = tx_pdfcreator2->makePdfLink
postUserFunc.target = _blank
postUserFunc.no_user_int = 0
}
[...]
[...]
page.120 < temp.PdfT
page.128 < temp.PdfI
[...]
If you use the Template Auto-Parser extension and you want to put the link somewhere on your page on every page, you may need to put it in a COA with another element. If you want to place it below the content, for example you need to change:
subparts.content < styles.content.get
to something like
subparts.content = COA
subparts.content {
10 = CONTENT
10 < styles.content.get
20 < temp.PdfT
}
and define temp.PdfT like above.
Please note that the link will be generated as a USER_INT object by default, i.e. that the link will be generated after the page has been pulled from the cache. If you want to go for maximum performance you can disable that with the parameter postUserFunc.no_user_int = 1 which will generate and cache the link. This is only recommended if you are sure that there are no USER_INT objects on the page that set POST or GET parameters. If you don't understand what i'm writing about leave it at default.