| birkit.com: Website Craftsmanship |
Making pdf and print-page links work with tt_news & realURLRealURL is a great plugin. Having clean looking URL's really adds a professional touch. But a problem occurs with the links for pdf_generator2 and make_printlink on pages that contain a tt_news plugin set to SINGLE view: instead of a nice printable page or pdf the message "no news_id given" is shown. The reason for the no news message is just what it says: no news_id! This problem is the same as backPid in SINGILE view. To correct the backPid problem it is necessary to simply set dontUseBackPid =1 in the tt_news setup. This way the unique backPid will be available. To correct the problem with the pdf and print links the variables tx_ttnews[tt_news] and tx_ttnews[sViewPointer] must be in the URL. The code example at the bottom of the page does the following:
Note: For sone reason the TS setting "no_cache = 1" does not get added to the Typolink. This is why there is the constant "cc=&no_cache = 1". Typoscript Constants:pdfIcon = fileadmin/images/pdf.png
printIcon = fileadmin/images/print.png site = http://www.birkit.com/?id={TSFE:id} printType = &print=1&type=98 pdfType = &pdf=1&type=123 #must have no cache or the same pdf will be shown cc = &no_cache=1 #unset article and pointer article = pointer = [globalVar = GP:tx_ttnews|tt_news > 0] article = &tx_ttnews[tt_news]={GPvar:tx_ttnews|tt_news} [GLOBAL] [globalVar = GP:tx_ttnews|sViewPointer > 0] pointer = &tx_ttnews[sViewPointer]={GPvar:tx_ttnews|sViewPointer} [GLOBAL] Typoscript Setup:[globalVar = GP:tx_ttnews|tt_news > 0]
page.2.marks{ PDF = COA PDF{ 10 = IMAGE 10.file = {$pdfIcon} 10.stdWrap.typolink{ parameter.dataWrap = {$site}{$pdfType}{$article}{$pointer}{$cc} } } PRINT = COA PRINT { 10 = IMAGE 10.file = {$printIcon} 10.stdWrap.typolink{ parameter.dataWrap = {$site}{$printType}{$article}{$pointer}{$cc} } } } [ELSE] page.2.marks{ PDF = COA PDF{ 10 = IMAGE 10.file = {$pdfIcon} 10.stdWrap.typolink.parameter.field = uid 10.stdWrap.typolink.additionalParams = {$pdfType} } PRINT = COA PRINT{ 10 = IMAGE 10.file = {$printIcon} 10.stdWrap.typolink.parameter.field = uid 10.stdWrap.typolink.additionalParams = {$printType} } } [GLOBAL] |
|
|