More experiences:
It tried to use type=user and userFunc but with no luck.
But it works and now i need the images back FE ;-)
The extbase Models are very basic and commented with experimental.

So i tried a more solid implementation.
First set:
<foreign_match_fields type="array"> <fieldname>tkcontent.fe2.content02.images</fieldname> </foreign_match_fields>
to a more unique name for the sys_file_references ;-)

then set up a small array in the Controller, in my case:
$files = array(
                        'table' => 'tt_content',
                        'uid' => $this->cObj->data['uid'],
                        'fieldName' => 'tkcontent.fe2.content02.images',
                        'width' => '584c',
                        'height' => '334c'
                );
and send it to fluid.
The Fluid Part:
<f:cObject typoscriptObjectPath="lib.tkcontentImage" data="{settings.content02.images}" />

The TS lib:
lib.tkcontentImage = COA
lib.tkcontentImage{
        20 = FILES
        20 {
          references {
                table.field = table
                uid.field = uid
                fieldName.field = fieldName
          }

          renderObj = COA
          renderObj {
                10 = IMAGE
                10 {
                  file.import.data = file:current:originalUid // 
file:current:uid
                  file.width.field = width
                  file.height.field = height
                }
        }
        }
}

works like a charm ;-)

FAL:
renaming Folder isn't a good idea -> error file deleted ;-(
create an new Folder and move the files to the new one.
No Problems and the images are still visible in FE ;-)

Hope this helps someone, Thomas

PS: now will see whats possible with FilesContentObject ;-)





Am 28.11.2012 15:46, schrieb Thomas Kieslich:
Hi, just coding a special Content Element with Flexforms.
I try to do it in the new Way ;-) It work, but perhaps there is an
easier Way to Implement a Media field?

Current Implementation (Thanks for making IRRE available in Flexforms):

<config>
                                 <type>inline</type>

<foreign_table>sys_file_reference</foreign_table>
                                 <foreign_field>uid_foreign</foreign_field>

<foreign_sortby>sorting_foreign</foreign_sortby>

<foreign_table_field>tablenames</foreign_table_field>
                                 <foreign_match_fields type="array">
                                     <fieldname>media</fieldname>
                                 </foreign_match_fields>
                                 <foreign_label>uid_local</foreign_label>

<foreign_selector>uid_local</foreign_selector>
                                 <maxItems>2</maxItems>
                                 <foreign_selector_fieldTcaOverride
type="array">
                                     <config>
                                         <appearance>

<elementBrowserType>file</elementBrowserType>

<elementBrowserAllowed>jpg,png</elementBrowserAllowed>
                                         </appearance>
                                     </config>
                                 </foreign_selector_fieldTcaOverride>
                                 <!--
<filter type="array">
<userFunc>TYPO3\\CMS\\Core\\Resource\\Filter\\FileExtensionFilter->filterInlineChildren</userFunc>

                                     <parameters>

<allowedFileExtensions>jpg,png</allowedFileExtensions>

<disallowedFileExtensions>php</disallowedFileExtensions>
                                     </parameters>
                                 </filter>-->
                                 <appearance type="array">
                                     <useSortable>TRUE</useSortable>
                                     <headerThumbnail type="array">
                                         <field>uid_local</field>
                                         <width>64</width>
                                         <height>64</height>
                                     </headerThumbnail>
<showPossibleLocalizationRecords>TRUE</showPossibleLocalizationRecords>
<showRemovedLocalizationRecords>TRUE</showRemovedLocalizationRecords>

<showSynchronizationLink>TRUE</showSynchronizationLink>
                                     <enabledControls type="array">
                                         <info>FALSE</info>
                                         <new>FALSE</new>
                                         <dragdrop>TRUE</dragdrop>
                                         <sort>FALSE</sort>
                                         <hide>TRUE</hide>
                                         <delete>TRUE</delete>
                                         <delete>TRUE</delete>
                                     </enabledControls>
                                 </appearance>
                                 <behaviour>

<localizationMode>select</localizationMode>
<localizeChildrenAtParentLocalization>TRUE</localizeChildrenAtParentLocalization>

                                 </behaviour>
                             </config>

Regards, Thomas
_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Reply via email to