2
votes

I want to add a new sorting option to the flexform in the frontend plugin of the TYPO3 extension tx_news. This works fine so far with these additions:

ext_tables.php of my theme extension:

$TYPO3_CONF_VARS['EXT']['news']['orderByNews'] .= ',archive';

TypoScript configuration within my theme extension:

plugin.tx_news.settings.orderByAllowed := addToList(archive)

What I miss now is the possibility to change the label of the new item archive in the select field Sort by of the flexform.

I assume it is done via page TSconfig and TCEFORM.tt_content.pi_flexform.news_pi1.sDEF.settings.orderBy but I can't figure out exactly how.

TYPO3 version is 6.2

2
I don't know how the extension is building the select. But normally you should be able to use altLabels as mentioned at docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/TCEform/… There you can use any language file you want. Even inside of your theme extension.Daniel

2 Answers

1
votes

This did the trick for me:

TCEFORM.tt_content.pi_flexform.news_pi1.sDEF.settings\.orderBy.altLabels.archive = LLL:EXT:my_theme/pathto.xlf:archive

It's important to escape the dot before the fieldname!

0
votes

I never tried to use pageTS to localize (only template TS), so I don't know if it is actually possible. I would however suggest localizing the label using the locallang files, in this case creating locallang_db.xlf in appropriate path in typo3conf/l10n/ with localization for tx_news_domain_model_news.archive label.

More info here: https://wiki.typo3.org/Translations#Translation_internals.2C_how_does_it_work.3F