[TYPO3-team-templavoila] RFC #15411: Unmapped Elements of etype 'ce' don't show in TV BE page module

Marcel Greter mgr at rtpartner.ch
Thu Aug 12 13:51:16 CEST 2010


Hello List,

That's my first post to this list, so I hope this patch is welcome here.

From http://bugs.typo3.org/view.php?id=15411 :

Our default page template has a field of type 'ce'. We also want to inherit that field and show it on another position on the page. Here is an example setup: 

<field_inherit type="array">
    <type>no_map</type>
    <tx_templavoila type="array">
        <eType>ce</eType>
    </tx_templavoila>
</field_inherit>

<field_position_x type="array">
    <tx_templavoila type="array">
        <TypoScript><![CDATA[	
            10 = RECORDS
            10.source.postUserFunc = tx_kbtvcontslide_pi1->main
            10.source.postUserFunc.field = field_inherit
            10.tables = tt_content
        ]]></TypoScript>	
    </tx_templavoila>
</field_position_x>

<field_position_y type="array">
    <tx_templavoila type="array">
        <TypoScript><![CDATA[
            5 = TEXT
            5.value.field = field_inherit
        ]]></TypoScript>
    </tx_templavoila>
</field_position_y>

I hope you can fallow. The problem now is, that the field_inherit is not shown in the BE TV page module, therefore we cannot fill in any content. The problematic code lies here:

ext/templavoila/mod1/index.php @ 1017 :
if ($elementContentTreeArr['previewData']['sheets'][$sheet][$fieldID]['isMapped'] && is_array($fieldValuesContent[$vKey]))

I'm not sure if this check (isMapped) really makes sense. IMO it should at least show the field if its type has been set to not mapped. Therefore I would propose to either show all fields or use:

if (is_array($fieldValuesContent[$vKey]) && ($elementContentTreeArr['previewData']['sheets'][$sheet][$fieldID]['isMapped'] || $elementContentTreeArr['previewData']['sheets'][$sheet][$fieldID]['type'] == 'no_map' ))

-------------------------------------

Maybe you want to remove the isMapped check altogether.
I don't really see a reason why this would make sense.
But we can live with it if only elements set to no_map show up.

Best regards, Marcel Greter



More information about the TYPO3-team-templavoila mailing list