[TYPO3-core] RFC: Bug #16262: Link browser shows wrong title for tt_content elements
Jeff Segars
jsegars at alumni.rice.edu
Mon Nov 8 23:06:32 CET 2010
On 11/5/10 6:53 AM, Reinhard Führicht wrote:
> Am 2010-11-05 12:39, schrieb Reinhard Führicht:
>> Hi,
>>
>> This is a SVN patch request
>>
>> Type: Bugfix
>>
>> Bugtracker reference: http://bugs.typo3.org/view.php?id=16262
>>
>> Branches: trunk
>>
>> Problem:
>> The link browser (browse_links.php) just displays the contents of the
>> header field of the record.
>>
>> - Empty title if the record's header field is empty.
>> - Wrong title when using alternative labels for tt_content.
>>
>> Solution:
>> Call t3lib_BEfunc::getRecordTitle() for this.
>>
>> How to reproduce:
>> - Open a simple text element
>> - Click on the wizard icon next to the "link" field
>> - Select the tab "Page"
>> - Expand a page in the tree having elements with no header, alternative
>> headers or such on it
>>
>> Regards,
>> Reinhard
>
> I found out, that the page title is also rendered wrong. So here is a
> new version of the patch.
Hey Reinhard,
Thanks for the patch! I think t3lib_BEfunc::getRecordTitle has a couple
optional arguments that would further simplify the code....
> /**
> * Returns the "title"-value in record, $row, from table, $table
> * The field(s) from which the value is taken is determined by the "ctrl"-entries 'label', 'label_alt' and 'label_alt_force'
> * Usage: 26
> *
> * @param string Table name, present in TCA
> * @param array Row from table
> * @param boolean If set, result is prepared for output: The output is cropped to a limited lenght (depending on BE_USER->uc['titleLen']) and if no value is found for the title, '<em>[No title]</em>' is returned (localized). Further, the output is htmlspecialchars()'ed
> * @param boolean If set, the function always returns an output. If no value is found for the title, '[No title]' is returned (localized).
> * @return string
> */
> public static function getRecordTitle($table, $row, $prep = FALSE, $forceResult = TRUE) {
Are you able to update the patch?
Thanks!
Jeff
More information about the TYPO3-team-core
mailing list