Hi Community,
ich komme in meiner Sache immo einfach nicht weiter, und muss nebenher noch andere Dinge erledigen, hat für mich vielleicht jemand ein Tipp parat?
Also ich möchte wie gesagt einen Printbutton in Abhängigkeit anzeigen lassen, und zwar nur von styles.content.get Inhalt ausgibt. Ich habe soweit mal vorgebaut:
Typoscript-Code:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16:
| seite = PAGE seite { typeNUM = 0 config.doctype = xhtml_strict includeLibs.print_func = fileadmin/metsoft/php/content_empty.php ...usw[b] - ERROR:[/b] Line 5: Object Name String, "...usw" was not preceeded by any operator, =<>({ - ERROR: Line 5: Object Name String, "...usw[b]" contains invalid character "[". Must be alphanumeric or one of: "_-." 10.marks { CONTENT < styles.content.get PRINT < temp.druckversion }[b] - ERROR:[/b] Line 15: The script is short of 1 end brace(s) - ERROR: Line 15: The script is short of 1 end brace(s) |
dann im kaskadierten Template temp.druckversion:
Typoscript-Code:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20:
| [userFunc = content_empty(print_show)] temp.druckversion = COA temp.druckversion { 10 = TEXT 10.data = getIndpEnv:REQUEST_URI 10.wrap = <a href="span><span class="ignored"> 20 = TEXT 20.data = getIndpEnv:REQUEST_URI 20.wrap = " name="Druckversion" title="Druckversion" onclick="window.open('|&type=98' , 'drucken', 'width=1024,height=600, resizable=yes, scrollbars=yes, menubar=yes');"><img src="{$printbutton}" title="print" class="" /></a> } [global] |
und meine PHP-Datei beinhaltet:
PHP-Code:
<?php
class user_print_func {
function content_empty() {
if (mysql_num_rows(mysql_query('SELECT * FROM tt_content WHERE (pid = 29) AND ((colPos =1) OR (colPos =2) OR (colPos =3) OR (colPos =4)) AND (deleted = 0)')) > 0) {
$print_show = 1;
return true;
} else {
return false;
}
}
}
?>
Ich habe schon ewig nicht mehr functionen benutzt oder gebraucht und weiß nicht mehr weiter. der Marker für den Druckbutton wird immo nicht angesprochen, weil [userFunc = content_empty(print_show)] nicht greift.
Wo liegt der Fehler? Freue mich über jede Hilfestellung!