[TYPO3-core] RFC: Better getRecordTitle() function introducing label_userFunc

Wolfgang Klinger wolfgang at stufenlos.net
Mon Dec 11 20:05:45 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

*hiya!*

Ingmar Schlecht wrote:
> Issue
> -----
> Getting the title of a record is not consistently implemented in the
> core. In most places, the title is built properly using
> t3lib_BEfunc::getRecordTitle(), but there are some functions which do
> not adhere to this rule. Therefore, the additional TCA properties like
> ['ctrl']['label_alt'] cannot be relied upon and it is not possible to
> implement a hook to add custom logic to build record titles.
> 
> Furthermore, I noted that the implementation of the no_label logic was
> also spread in several places.
> 
> Solution
> --------
> 1. All (hopefully... :-) places in the core where a record title is
> needed are now using t3lib_BEfunc::getRecordTitle()
> 2. t3lib_BEfunc::getRecordTitle() was expanded (backwards compatible) by
> an additional (optional) parameter. If this parameter is set, the
> function will _always_ return a value. If no value is found for the
> title, '[No title]' is returned (localized).
> 3. The new TCA option ['ctrl']['label_userFunc'] was introduced in
> t3lib_BEfunc::getRecordTitle() to enable custom logic if needed.

thanks for this
+1
(browsing through the patch and description)


bye
Wolfgang

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFfawJqdbDgXT355kRAisqAJwMwpg4vVAkzclFklQ8MirRV3zBiQCfT4Z+
3KogFJZMUgFr4fkuA//Kv1A=
=+Qi1
-----END PGP SIGNATURE-----


More information about the TYPO3-team-core mailing list