Hallo,
ich habe mir aus einem kleinen Tutorial eine Druckversion gebaut. Leider wird der URL nicht vollständig übergeben (nur id=uid&type=1). Ich benötige ja noch die ganzen Übergaben von z. B. tt_news (&tx_ttnews[tt_news]=1&tx_ttnews[backPid]=6&cHash=15712a82fe#) Kann mir jemand sagen, wie ich das hinbekomme?
Hier mein TS:
temp.printlink = TEXT
temp.printlink.wrap = <a class="printlink" href="#" onclick="window.open('index.php?id=|&type=1','Druckversion','height=800, width=700, scrollbars=yes');"><img src="fileadmin/templates/img/print.gif" border="0" alt="" /></a>
temp.printlink.field = uid
Vielen Dank schon mal.
Viele Grüße vom Bodensee, Uwe
mach einen richtigen Link, und das geht mit typolink
10 = TEXT
10.value = print
10.typolink {
parameter = ,1 800x600
addQueryString = 1
useCacheHash = 1
ATagParams = class="print-link"
title = Drucke diese Seite
JSwindow_params = scrollbars=0,resizable=0
}
Doku: https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Functions/Typolink.html
Vielen Dank für Deinen Hinweis. Habe gleich was über typolink gelernt. Und wie man ein Bild mit diesem Link umschließt.
Hier nun mein komplettes TS für die Erstellung einer Druckversion:
####Druckversion Start####
temp.printlink = IMAGE
temp.printlink {
file = fileadmin/templates/img/print.gif
imageLinkWrap = 1
imageLinkWrap {
enable = 1
typolink {
parameter = ,1 800x600
addQueryString = 1
useCacheHash = 1
ATagParams = class="printlink"
title = Drucke diese Seite
JSwindow_params = scrollbars=0,resizable=1
}
}
}
druckversion = PAGE
druckversion {
typeNum = 1
includeCSS.file = fileadmin/templates/css/print.css
bodyTag = <body onload="javascript:window.print()">
}
druckversion.10 = TEMPLATE
druckversion.10 {
template = FILE
template.file = fileadmin/templates/templates/print.html
workOnSubpart = DOCUMENT_BODY
marks.CONTENT_NORMAL < styles.content.get
marks.CONTENT_RECHTS < styles.content.getRight
marks.CONTENT_LINKS < styles.content.getLeft
}
page.10.marks.PRINTLINK < temp.printlink
####Druckversion Ende####
Hier das vereinfachte Template (template.file = fileadmin/templates/templates/print.html):
<html>
<head></head>
<body>
<!--###DOCUMENT_BODY### start -->
<table width="98%" height="600" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="links" width="33%" valign="top">###CONTENT_LINKS###</td>
<td class="rechts" valign="top" width="77%">###CONTENT_NORMAL###</td>
</tr>
</table>
<!--###DOCUMENT_BODY### stop -->
</body>
</html>
Und etwas css (includeCSS.file = fileadmin/templates/css/print.css):
body {
font-family: verdana;
background-color: #ffffff;
margin: 0px;
}
table, td, div, p {
font-size: 12px;
color: #000000;
}
li {
list-style-image: url(../img/bullet.gif);
}
a {
color: #0000ff;
text-decoration: underline;
}
a:hover {
text-decoration: underline;
}
.links {
padding: 30px 10px 20px 20px;
}
h1 {
font-size: 14px;
color: #000000;
font-weight: bold;
}
h1 a {
text-decoration: none;
}
.rechts {
padding: 30px 10px 20px 20px;
}
Vielen Dank, Uwe
imageLinkWrap ist gar nicht nötig, das geht auch so
temp.printlink = IMAGE
temp.printlink {
file = fileadmin/templates/img/print.gif
stdWrap.typolink {
...
}
}
Stimmt. Gab es da nicht mal ein Wettbewerb in T3N, wer das kürzeste TS schreibt ;-)
Hie die korrigierte und getestete Version:
####Druckversion Start####
temp.printlink = IMAGE
temp.printlink {
file = fileadmin/templates/img/print.gif
stdWrap.typolink {
parameter = ,1 800x600
addQueryString = 1
useCacheHash = 1
ATagParams = class="printlink"
title = Drucke diese Seite
JSwindow_params = scrollbars=0,resizable=1
}
}
}
druckversion = PAGE
druckversion {
typeNum = 1
includeCSS.file = fileadmin/templates/css/print.css
bodyTag = <body onload="javascript:window.print()">
}
druckversion.10 = TEMPLATE
druckversion.10 {
template = FILE
template.file = fileadmin/templates/templates/print.html
workOnSubpart = DOCUMENT_BODY
marks.CONTENT_NORMAL < styles.content.get
marks.CONTENT_RECHTS < styles.content.getRight
marks.CONTENT_LINKS < styles.content.getLeft
}
page.10.marks.PRINTLINK < temp.printlink
####Druckversion Ende####
Viele Grüße vom Bodensee, Uwe
Hallo,
es gibt doch noch eine Fortsetzung. Ich habe realurl aktiviert und nun gibt typolink auf jeder Seite das aus (home.html ist die erste Seite):
http://www.seite.org/home.html?type=1
tt_news-Detailseiten sehen so aus:
http://www.seite.org/home/article/solar-als-folie.html?type=1&tx_ttnews%5BbackPid%5D=6&cHash=15712a82fe
Habe das Forum schon durchgegrast, leider keine Lösung gefunden. Hat jemand ne Idee?
Viele Grüße, Uwe
dann nimm die sichere Variante:
parameter.dataWrap = {TSFE:id},1 800x600
Danke steffenk, funktioniert (sehr geil)! Mit und ohne realurl. Hier noch einmal das ganze am Stück:
##### Druckversion #####
temp.printlink = IMAGE
temp.printlink {
file = fileadmin/templates/img/print.gif
stdWrap.typolink {
parameter.dataWrap = {TSFE:id},1 800x600
addQueryString = 1
useCacheHash = 1
ATagParams = class="printlink"
title = Drucke diese Seite
JSwindow_params = scrollbars=1, resizable=1
}
}
}
druckversion = PAGE
druckversion {
typeNum = 1
includeCSS.file = fileadmin/templates/css/print.css
bodyTag = <body onload="javascript:window.print()">
}
druckversion.10 = TEMPLATE
druckversion.10 {
template = FILE
template.file = fileadmin/templates/templates/print.html
workOnSubpart = DOCUMENT_BODY
marks.CONTENT_NORMAL < styles.content.get
marks.CONTENT_RECHTS < styles.content.getRight
marks.CONTENT_LINKS < styles.content.getLeft
}
page.10.marks.PRINTLINK < temp.printlink
#### Druckversion Ende ####
Viele Grüße aus Konstanz, Uwe