[TYPO3-german] Per PHP jedes Content-Element um String erweitern?
Christian Wolff
chris at connye.com
Wed Oct 12 17:02:21 CEST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hallo Björn
ich würde das einfach als postUserFunc
im stdWrap Machen.
gruss chris
Am 12.10.2011 16:09, schrieb Julian Pleger:
> Hallo Björn,
>
> den Hook habe ich auch gerade gefunden, allerdings habe ich dort
> immer noch das gleiche Problem.
>
> Mit dem Hook rufe ich mir diese Funktion auf:
>
> function stdWrapPostProcess($content, array $configuration,
> tslib_cObj &$parentObject) { echo $parentObject->data['uid'].'<br
> >'; return $content; }
>
> Dabei erhalte ich wieder 20 mal die uid 217, 8 mal die uid 216,
> usw. ... Heißt wiederum: wenn ich etwas an den Content hänge
> bekomme ihc es X-fach. Die Funktion scheint jedes mal aufgerufen zu
> werden, sobald etwas in dem jeweiligen content-element gewrapped
> wird (und nicht erst ganz am Schluss). Denn wenn ich "return
> $content;" zu "return $content . 'test';" ausweite, zerhakt es mir
> das Design und ich bekomme Teile vom CSS Code zu sehen, in dem der
> String "test" dann wieder auftaucht.
>
> Also prinzipiel möchte ich folgendes: Ich kann pro Content Element
> eine frage anlegen. Das funktioniert auch wunderbar. Nun möchte ich
> jedes Content Element prüfen, ob es mit einer Frage verknüpft ist
> oder nicht. Ist es der Fall, so soll die Frage am Ende des Content
> Elements ausgegeben werden.
>
> Argh ich verzweifel :-(
>
> Aber danke für eure Hinweise!!! :)
>
> -------- Original-Nachricht --------
>> Datum: Wed, 12 Oct 2011 15:50:43 +0200 Von: "Björn Pedersen"
>> <pedersen at frm2.tum.de> An: typo3-german at lists.typo3.org Betreff:
>> Re: [TYPO3-german] Per PHP jedes Content-Element um String
>> erweitern?
>
>> Am 12.10.2011 15:39, schrieb Kay Strobach: Probier mal:
>>
>> /** * stdWrap post process hook * can be used by extensions
>> authors to modify the behaviour of stdWrap functions to their
>> needs * this hook executes functions at after the content has
>> been modified by the rest of the stdWrap functions but still
>> before debugging * * @param string Input value undergoing
>> processing in these functions. * @param array All stdWrap
>> properties, not just the ones for a particular function. *
>> @return string The processed input value */ public function
>> stdWrap_stdWrapPostProcess($content = '', $conf = array()) {
>>
>> Damit solltest du einfacher zu Rande kommen.
>>
>> Björn
>>
>> _______________________________________________ TYPO3-german
>> mailing list TYPO3-german at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german
>
- --
Christian Wolff // Berlin
http://www.connye.com
some projects:
http://richtermediagroup.com | http://titanic.de | http://keyopinions.info
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
iEYEARECAAYFAk6Vq/0ACgkQIcCaXPh/JHHgnQCdEongEvCtFYAh9xtWx2fBAmAR
XloAoJ68e1zjL5g2aflJXV8Ytzub5F45
=gei0
-----END PGP SIGNATURE-----
More information about the TYPO3-german
mailing list