[TYPO3-templavoila] create copy of fce in other language

Andreas Kiessling kiessling at pluspol.info
Tue Aug 17 15:15:38 CEST 2010


Hi,

On 13.02.2009 14:47, Georg Schönweger wrote:
> so there is no way to get this "create copy... " link for FCE's?
>

that's exactly the question i was confronted with today. Problem is in 
class.tx_templavoila_api.php in function 
"getContentTree_getLocalizationInfoForElement" and the way it is 
determined, what to do with localized / localizable elements:

"} elseif ($contentTreeArr['el']['CType']!='templavoila_pi1') {	// Only 
localize content elements with "Default" langauge set"

This disables the "Create a copy for translation"-link for all FCEs. I 
understand, that FCEs need to be treated differently than regular 
content elements, due to
- the possibility to do inline translations
- container elements with different language / translation settings

So all my FCEs with langDisable 1 end up with the setting 
'no_localization' and so don't get the "Create..."-link, when the page 
module is built in mod1/index.php, although they should be treated like 
a regular / single content element.

Changing the condition to this shows the link and seems to be enough to 
fix it for me (language setting is checked in mod1/index.php):

} elseif ($contentTreeArr['el']['CType']!='templavoila_pi1' || 
($contentTreeArr['el']['CType']=='templavoila_pi1' && 
$contentTreeArr['ds_meta']['langDisable'])) {


Tolleiv and Steffen probably do have some more insight, what needs to be 
considered to make this safe for FCEs. I don't use them that often, 
especially when having to deal with langDisable / langChildren settings.


Regards,
Andreas


More information about the TYPO3-project-templavoila mailing list