[TYPO3-UG Oesterreich] PHP Skript - Ausgabe im Template

robert baumgart robert.baumgart at chello.at
Sun Aug 20 19:49:41 CEST 2006


hi!

oder ohne extra extention:

tmp.CONTENT = COA
tmp.CONTENT {
   10 < styles.content.get
   20 = PHP_SCRIPT_EXT
   20.file = fileadmin/scripts/surprise.inc
}

  temp.mainTemplate {
    template =< plugin.tx_automaketemplate_pi1
    workOnSubpart = DOCUMENT_BODY
    subparts.LayerMenu < temp.LayerMenu
    subparts.content < tmp.CONTENT
  }

lg
robert


peda daremes wrote:
> Hi Tuga-Gemeinde!
> 
> Mühe mich mit einem 'PHP include'-Beispiel ab. Die Ausgabe 'Hello 
> World'  soll nach einem Datensatz 'Inhalt' aufscheinen. Der Skript des 
> Templates  stammt ursprünglich von einem bekannten Tutorial. Alles 
> andere ist auch  danach aufgebaut. Bloss die Sache mit dem Einbinden des 
> PHP-Skripts will  mir nicht gelingen. Die Ausgabe von 'Hello World' ist 
> ausserhalb der  'subparts' und daher nicht im Browser zu sehen. Hat 
> jemand von euch einen  Tipp für mich, wie ich die PHP-Ausgabe in das 
> Template einer Seite zwinge?
> 
> Hier das Setup der Extension:
> ----------------
> # Setup - Beginn
> # suchmaschinenfreundliche URLs erzeugen
>  config.simulateStaticDocuments = 1
>  config.simulateStaticDocuments_noTypeIfNoTitle = 1
> 
> # main TEMPLATE cObject for the BODY
> temp.mainTemplate = TEMPLATE
> 
> temp.mainTemplate {
>   template =< plugin.tx_automaketemplate_pi1
>   workOnSubpart = DOCUMENT_BODY
>   subparts.LayerMenu < temp.LayerMenu
>   subparts.content < styles.content.get
> }
> 
> # main TEMPLATE cObject for the head
> temp.headTemplate = TEMPLATE
> 
> temp.headTemplate {
>   template =< plugin.tx_automaketemplate_pi1
>   workOnSubpart = DOCUMENT_HEADER
> }
> 
> # Default PAGE object:
> config.includeLibrary = fileadmin/scripts/include.inc
> page = PAGE
> page.typeNum = 0
> page.config.doctype = xhtml_trans
> page.stylesheet = fileadmin/template/main/res/dielogomaten_style.css
> 
> # copying the content from TEMPLATE for <body>-section:
> page.10 < temp.mainTemplate
> 
> # php include
> # Problem: 'Hello World' wird ausserhalb vom CONTENT ELEMENT geschrieben.
> page.20 = PHP_SCRIPT
> page.20.file = fileadmin/scripts/surprise.inc
> 
> # copying the content from TEMPLATE for <head>-section
> page.headerData.10 < temp.headTemplate
> # Setup - Ende
> ------------------
> Für eure Hilfe vielen Dank im Voraus!
> 
> peda



More information about the TYPO3-at mailing list