0

I have problems to access single records of my frontend extension on different content pages in typo3 6.1.5.

Currently it's only possible to ether put out the whole list or to have multiple records with the same content.

I googled and have also tried this solution: How to quickly create custom content elements in TYPO3 6.x

But it didn't work.

The extension has the following fields: headercapton (string), headericon (image), bodytext (rich text), buttoncaption (string), buttonlink (link)

To register the plugin as content Type I have tried the following configuration which didn't work also:

$TCA['tt_content']['columns']['CType']['config']['items']['45']['0'] = 'Advanced Teaser';
$TCA['tt_content']['columns']['CType']['config']['items']['45']['1'] = 'advancedteasers_domain_model_teaser';
$TCA['tt_content']['types']['advancedteasers_domain_model_teaser']['showitem'] = '--palette--;LLL:EXT:cms/locallang_ttc.xml:palette.general;general,sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, headercapton, headericon, bodytext, buttoncaption, buttonlink,--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,starttime, endtime';

The value in the last line I have taken from

$TCA['tx_advancedteasers_domain_model_teaser']['types']['1']['showitem'] 

and lightly modified it.

Is there some good book or documentation in Internet regarding the syntax of the TCA values? And also regarding the principles of how to put such values together?

I have read the official documentation of typo3, but it is not understandable enough.

Many thanks for your answers in advance.

P.S. I also tried this variant taking the language values from the language file of the plugin:

$TCA['tt_content']['types']['advancedteasers_domain_model_teaser']['showitem'] = '--palette--;LLL:EXT:cms/locallang_ttc.xml:palette.general;general,sys_language_uid;;;;1-1-1,l10n_parent,l10n_diffsource,hidden;;1,LLL:EXT:advanced_teasers/Resources/Private/Language/locallang_db.xlf:tx_advancedteasers_domain_model_teaser.headercapton,tx_advancedteasers_domain_model_teaser.headericon,tx_advancedteasers_domain_model_teaser.bodytext,tx_advancedteasers_domain_model_teaser.buttoncaption,tx_advancedteasers_domain_model_teaser.buttonlink,--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,starttime,endtime';

It didn't work also.

All the custom fields are declared in the extension folder: advanced_teasers/Configuration/TCA/Teaser.php

in the array

$TCA['tx_advancedteasers_domain_model_teaser']

So i also tried to put these snippet to Teaser.php:

$TCA['tt_content']['columns']['CType']['config']['items']['45']['0'] = 'Advanced Teaser';
$TCA['tt_content']['columns']['CType']['config']['items']['45']['1'] = 'advancedteasers_domain_model_teaser';
$TCA['tt_content']['types']['advancedteasers_domain_model_teaser']['showitem'] = $TCA['tx_advancedteasers_domain_model_teaser'];

but it didn't help.

What am I doing wrong?

Community
  • 1
  • 1

1 Answers1

1

$TCA is the "table configuration array" and basically controls, what shall be shown in the TYPO3 backend - it defines the editor's interface. Since you're loooking for the frontend rendering and I assume that you use an MVC approach, you need to configure the behaviour of your TeaserRespository (can be found in ./Classes/Domain/Repository/TeaserRepository.php of your advancedteasers extension).

The following site explains, what can be done there - e.g. search for "setRespectStoragePage" there: http://forge.typo3.org/projects/typo3v4-mvc/wiki/Default_Orderings_and_Query_Settings_in_Repository

Oliver Hader
  • 4,093
  • 1
  • 25
  • 47