Zum Inhalt springen

cObject USER: Problemen mit userFunc

Erstellt am 19. März 2009 · 3 Antworten · letzte Antwort am 19. März 2009

Tags: Frage

azzazel ·

Hallo,

ich hab in einem FCE folgenden TypoScript Code:

<typoscript>												<![CDATA[
  includeLibs.getLink = fileadmin/templates/fce/fce_catdownloads/php/getLink.php
  temp.info = COA
  temp.info.10 = TEXT
  temp.info.10.value = A
  temp.info.20 = USER
  temp.info.20 {
    userFunc = user_getLink->main
  }
  temp.info.30 = TEXT
  temp.info.30.value = B

  10 = TEXT
  10 < temp.info
													]]>														</typoscript>

Die PHP-Class sieht so aus:

class user_getLink {	
		var $cObj;
		
		function main($content, $conf) {
			
			$content = "Hello World";
			
			return $content;
		}
	}

Die Ausgabe ist lediglich "AB". ICh weiss nicht warum die Klasse nichts ausgbit. der include pfad der library hab ich mehrmals ueberprueft. Ich weiss nicht mehr weiter.

lg

azzazel

einpraegsam.​net ·

Erstmal sieht alles gut aus, aber danach kommt 10 = TEXT ...

Was ich sagen will:
includeLibs muss ganz oben stehen (also nicht innerhalb von page.)
Alternativ: Cache hast du geleert?

azzazel ·

Hallo,

Cach hab ich gelert. (Mermals 🙂 ) dieses Typoscript ist in einem TemplaVoila FCE. Koennte das problem dort liegen ?

lg

azzazel

azzazel ·

Also konnte es beheben. ich hab im Template (der seite) vor der page das modul included. Dann funktionierte es einwandfrei.

Herzlichen Dank

azzazel