Zum Inhalt springen

printlink -> leere seite

Erstellt am 25. März 2005 · 3 Antworten · letzte Antwort am 26. März 2005

Tags: Frage

danabanana ·

Hallo Typos,

ich versuche seit einiges ein print link bei mir einzurichtem.

habe auch hier snipples gesamelt, und nach ich im forum einiges gelesen, habe ich folgendes:

in meinem html temolate habe ich diese marker:
###DRUCKVERSION###

im haupt template habe ich unter include static:
plugin.alt.print
included

im constants habe ich:

##########
# print plugin#
##########
plugin.alt.print {
file.template = fileadmin/templates/mediatech/sub_temp/printversion_content.htm
file.stylesheet = fileadmin/css/print_style.css
}

im setup:
subparts.DRUCKVERSION < marks.DRUCKVERSION

und

###############
# Druckversion 
###############
marks.DRUCKVERSION= TEXT
marks.DRUCKVERSION.value = drucken
marks.DRUCKVERSION.postUserFunc = tx_make_printlink
marks.DRUCKVERSION.postUserFunc.include_post_vars = 1
marks.DRUCKVERSION.postUserFunc.target = _blank
marks.DRUCKVERSION.postUserFunc.popup = 1
marks.DRUCKVERSION.postUserFunc.windowparams = (
 resizable=yes,toolbar=no,scrollbars=yes,menubar=no,width=800,height=500
)
marks.DRUCKVERSION.postUserFunc.windowname = printwindow

die seiten öffnen sich schon ip pop-up, aber ohne inhalt. Habe ich was vergessen? :o

Wäre dankbar für jede hinweis

toyde ·

hallo die Dame :p

Hier meine funktionierende Config:
CSS für Printversion (constants root template):

plugin.alt.print { 
  file.stylesheet =  fileadmin/print.css
}

Mein Druck-Marker(Setup):

marks.DRUCKEN = TEXT 
   marks.DRUCKEN { 
   field = uid 
   wrap = <a href="index.php?id=|&type=98">...</a>
}

Das Wichtige dabei ist, dass du für den Browser die ID vom Type 98 mitgibst, sonst findet er Nichts.

plugin.alt.print 98 hast du ja bereits included, wie ich sehe.

hoffentlich hilfts.
cu - schöne Ostern

edit:
-----
Ich sehe immer wieder neue Sachen🙂
"subparts.DRUCKVERSION < marks.DRUCKVERSION". Du kopierst damit doch den marks in den subparts... Auch eine Möglichkeit. Weshalb nicht direkt den subpart, bzw. marks ausgeben?

johanness ·

Am besten lässt du diesen Ansatz gleich bleiben. Er ist veraltet und die Extension "make_printlink" funktionniert so richtig gut 8-)

danabanana ·

also, so habe ich es hinbekommen:

constants:

plugin.alt.print { 
  file.template = fileadmin/templates/mediatech/sub_temp/printversion.htm
  file.stylesheet =  fileadmin/templates/mediatech/css/print.css
}

setup:

###############
# Druckversion 
###############
page.1.subparts.DRUCKVERSION= TEXT
page.1.subparts.DRUCKVERSION.value =  <img src="fileadmin/templates/mediatech/images/icons/print_icon.gif" alt="Druckversion dieser Seite" width="16" height="16" border="0" />
page.1.subparts.DRUCKVERSION.postUserFunc = tx_make_printlink
page.1.subparts.DRUCKVERSION.postUserFunc.include_post_vars = 1
page.1.subparts.DRUCKVERSION.postUserFunc.target = _blank
page.1.subparts.DRUCKVERSION.postUserFunc.popup = 1
page.1.subparts.DRUCKVERSION.postUserFunc.windowparams = (
resizable=no,toolbar=no,scrollbars=yes,menubar=no,width=680,height=500
)
page.1.subparts.DRUCKVERSION.postUserFunc.windowparams = resizable=no,toolbar=no,scrollbars=yes,menubar=no,width=680,height=500
#page.1.subparts.DRUCKVERSION.postUserFunc.windowname = printwindow 

[globalVar = GP:L=0] 
page.1.subparts.DRUCKVERSION.value =  <img src="fileadmin/templates/mediatech/images/icons/print_icon.gif" alt="Druckversion dieser Seite" width="16" height="16" border="0" />

[globalVar = GP:L=3] 
page.1.subparts.DRUCKVERSION.value =  <img src="fileadmin/templates/mediatech/images/icons/print_icon.gif" alt="Printer friendly version" width="16" height="16" border="0" />
[global] 



printpage = PAGE
printpage {
    bodyTag = <body onLoad="javascript:window.print()"> 
    #stylesheet = fileadmin/templates/mediatech/css/print.css
    stylesheet = {$plugin.alt.print.file.stylesheet} 
    typeNum = 98
    #10 = TEXT
    #10.field = title
    #10.wrap = <h1>|</h1>
    #20 = TEXT
    #20.field = subtitle
    #20.wrap = <h2>|</h2>
    #30 = CONTENT
    #30 < styles.content.get
    #40 = TEXT
    #40.value = <a href="javascript:self.close();"> <img src="fileadmin/templates/mediatech/images/icons/close_icon.gif" alt="Fenster schließen" width="16" height="16" border="0" /></a>
    }

printpage.50 = TEMPLATE 
printpage.50 { 
template = FILE 
template.file = {$plugin.alt.print.file.template} 
subparts { 
SEITENTITEL = TEXT 
SEITENTITEL.value = {page:title} 
SEITENTITEL.insertData = 1 
SEITENTITEL.wrap = <h1>|</h1> 
SEITENUNTERTITEL = TEXT 
SEITENUNTERTITEL.value = {page:subtitle} 
SEITENUNTERTITEL.insertData = 1 
SEITENUNTERTITEL.wrap = <h2>|</h2>
CONTENT < styles.content.get
LASTUPDATE < plugin.tx_lastupdate_pi1 
INFO = PHP_SCRIPT
INFO.file = fileadmin/templates/mediatech/sub_temp/info_3.php

  }  
    workOnSubpart = DOCUMENT_BODY 
} 

#close button
printpage.50.subparts.CLOSE= TEXT
printpage.50.subparts.CLOSE.value =  <a href="javascript:self.close();"> <img src="fileadmin/templates/mediatech/images/icons/close_icon.gif" alt="Fenster schließen" width="16" height="16" border="0" /></a>

[globalVar = GP:L=0] 
printpage.50.subparts.CLOSE.value =  <a href="javascript:self.close();"> <img src="fileadmin/templates/mediatech/images/icons/close_icon.gif" alt="Fenster schließen" width="16" height="16" border="0" /></a>

[globalVar = GP:L=3] 
printpage.50.subparts.CLOSE.value =  <a href="javascript:self.close();"> <img src="fileadmin/templates/mediatech/images/icons/close_icon.gif" alt="close window" width="16" height="16" border="0" /></a>
[global] 

#windo.print
printpage.50.subparts.WINDOW_PRINT = TEXT
printpage.50.subparts.WINDOW_PRINT.value =  <a href="javascript:window.print()"><img src="fileadmin/templates/mediatech/images/icons/print_icon.gif" alt="Diese Seite drucken" width="16" height="16" border="0" /></a>

[globalVar = GP:L=0] 
printpage.50.subparts.WINDOW_PRINT.value =  <a href="javascript:window.print()"><img src="fileadmin/templates/mediatech/images/icons/print_icon.gif" alt="Diese Seite drucken" width="16" height="16" border="0" /></a>

[globalVar = GP:L=3] 
printpage.50.subparts.WINDOW_PRINT.value = <a href="javascript:window.print()"><img src="fileadmin/templates/mediatech/images/icons/print_icon.gif" alt="Print this page" width="16" height="16" border="0" /></a>
[global]

html print version:

<!DOCTYPE html

     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">

	<head>

		<title>Flashexpert TYPO3 Template</title>

		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

	</head>

	<body>	

		<!-- ###DOCUMENT_BODY### START-->

			<!--TYPO3SEARCH_begin--> 

		<table width="628" align="center" cellpadding="0" cellspacing="0">

			<tr class="contentheader">

               <td width="480" valign="bottom" >


<!-- ###CLOSE### START-->

    	    			 CLOSE

			      <!-- ###CLOSE### END-->
<!-- ###WINDOW_PRINT### START-->

    	    			 WINDOW_PRINT

			      <!-- ###WINDOW_PRINT### END-->

<!-- ###SEITENTITEL### START-->

    	    			 SEITENTITEL

			      <!-- ###SEITENTITEL### END-->
<!-- ###SEITENUNTERTITEL### START-->

    	    			 SEITENUNTERTITEL

			      <!-- ###SEITENUNTERTITEL### END--> 
<!-- ###CONTENT### START-->
	          			CONTENT
<!-- ###CONTENT### STOP-->
<!-- ###LASTUPDATE### START-->

              LASTUPDATE

	            <!-- ###LASTUPDATE### STOP--> 
			  </td>

	            <td width="10" valign="bottom" >&nbsp;</td>

	            <td width="130" rowspan="7" valign="top"  class="navi_top_points"><!-- ###INFO### START-->
INFO
  <!-- ###INFO### END--></td>
          </tr>

		 

	    <tr>

          <td colspan="2">

        </td>

        </tr>

		  <tr>

	         <td colspan="2">

	         </td>

          </tr>

          

         

   		</table>

        	<!--TYPO3SEARCH_end-->

       		<!-- ###DOCUMENT_BODY### end -->

    </body>

</html>

ich glaube, es ist viel zu lang, aber funktioniert. :-)

VIelen dank