Discussion:
TYPO3 6.0: Using FAL image in a flexform as an element
(too old to reply)
Udo Leimberger
2013-01-10 13:28:28 UTC
Permalink
Hello @all,
I tried to add a FAL image as an element in a flexform.

Here is my flexformcode:
----
<settings.newimage>
<TCEforms>
<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>image</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>
<appearance type="array">
<createNewRelationLinkTitle>Add new Image</createNewRelationLinkTitle>
<useSortable>TRUE</useSortable>
<showPossibleLocalizationRecords>TRUE</showPossibleLocalizationRecords>
<showRemovedLocalizationRecords>TRUE</showRemovedLocalizationRecords>
<showSynchronizationLink>TRUE</showSynchronizationLink>
<enabledControls type="array">
<info>FALSE</info>
<new>TRUE</new>
<dragdrop>TRUE</dragdrop>
<sort>TRUE</sort>
<hide>TRUE</hide>
<delete>TRUE</delete>
<localize>TRUE</localize>
</enabledControls>
<levelLinksPosition>both</levelLinksPosition>
</appearance>
<behaviour>
<localizationMode>select</localizationMode>
<localizeChildrenAtParentLocalization>TRUE</localizeChildrenAtParentLocalization>
</behaviour>
</config>
</TCEforms>
</settings.newimage>

This works but I have some questions. Perhaps there are some bugs also.

1) How can you change a palette view for this element. If I render a flexform with the config above .. i can add images with title and descriptions, but i miss alternate text and link like in an regular FAL image CE.

2) if I change parameters in the enabledControls section i.e. detele => TRUE to delete => FALSE the paperbasket for deleting items is already in the rendered form. Same to hide or new.

3) Maxitems - parameter seems to have no influence.

Does anybody have the same problems with FAL images (media) in a flexform ?

Regards
Udo
bigbozo
2013-01-23 16:10:55 UTC
Permalink
Post by Udo Leimberger
1) How can you change a palette view for this element. If I render a
flexform with the config above .. i can add images with title and
descriptions, but i miss alternate text and link like in an regular FAL
image CE.
This works for me: Index 2 = \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE

<settings.newimage>
<TCEforms>
<config>
...

<foreign_types type="array">
<numIndex index="2">

<showitem>title,description,alternative,link</showitem>
</numIndex>
</foreign_types>

</config>
</TCEforms>
</settings.newimage>



--
View this message in context: http://typo3.3.n7.nabble.com/TYPO3-6-0-Using-FAL-image-in-a-flexform-as-an-element-tp236743p237274.html
Sent from the TYPO3 English mailing list archive at Nabble.com.
Udo Leimberger
2013-01-23 16:34:59 UTC
Permalink
Hi bigboz,

thanks for your answer..Index 2 did the magic thing. Thank you.
To use Core paletts ist is a good thing to use it like this:

<foreign_types type="array">
<numIndex index="2" type="array">
<showitem>--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem>
</numIndex>
</foreign_types>

perfect.
Any idea for problem numer 2) or 3) ?

regards Udo
Post by bigbozo
Post by Udo Leimberger
1) How can you change a palette view for this element. If I render a
flexform with the config above .. i can add images with title and
descriptions, but i miss alternate text and link like in an regular FAL
image CE.
This works for me: Index 2 = \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE
<settings.newimage>
<TCEforms>
<config>
...
<foreign_types type="array">
<numIndex index="2">
<showitem>title,description,alternative,link</showitem>
</numIndex>
</foreign_types>
</config>
</TCEforms>
</settings.newimage>
--
View this message in context: http://typo3.3.n7.nabble.com/TYPO3-6-0-Using-FAL-image-in-a-flexform-as-an-element-tp236743p237274.html
Sent from the TYPO3 English mailing list archive at Nabble.com.
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
bigbozo
2013-01-24 13:51:25 UTC
Permalink
Hi Udo,
Post by Udo Leimberger
2) if I change parameters in the enabledControls section i.e. detele =>
TRUE to delete => FALSE the paperbasket for deleting items is already in
the rendered form. Same to hide or new.
I've debugged the whole rendering process for these beasties - what a pain
;). The flags are compared to false, but the Flexform-Value gets resolved to
(string)"FALSE", so they're in fact true. You have to leave them empty to
work. Don't know if this is to be considered bug or feature.
Post by Udo Leimberger
3) Maxitems - parameter seems to have no influence.
I think its maxitems - not maxItems

Hope this helps
bigbozo

PS: How do you work with this list? I don't get the grip of this
"mailinglist"-thing. I've just figured out how to answer because your
initial question got me running with FAL in flexform :)




--
View this message in context: http://typo3.3.n7.nabble.com/TYPO3-6-0-Using-FAL-image-in-a-flexform-as-an-element-tp236743p237338.html
Sent from the TYPO3 English mailing list archive at Nabble.com.
Udo Leimberger
2013-01-24 16:57:03 UTC
Permalink
Hi bigbozo,

great. works. Thank you.

Udo
Post by bigbozo
Hi Udo,
Post by Udo Leimberger
2) if I change parameters in the enabledControls section i.e. detele =>
TRUE to delete => FALSE the paperbasket for deleting items is already in
the rendered form. Same to hide or new.
I've debugged the whole rendering process for these beasties - what a pain
;). The flags are compared to false, but the Flexform-Value gets resolved to
(string)"FALSE", so they're in fact true. You have to leave them empty to
work. Don't know if this is to be considered bug or feature.
Post by Udo Leimberger
3) Maxitems - parameter seems to have no influence.
I think its maxitems - not maxItems
Hope this helps
bigbozo
PS: How do you work with this list? I don't get the grip of this
"mailinglist"-thing. I've just figured out how to answer because your
initial question got me running with FAL in flexform :)
--
View this message in context: http://typo3.3.n7.nabble.com/TYPO3-6-0-Using-FAL-image-in-a-flexform-as-an-element-tp236743p237338.html
Sent from the TYPO3 English mailing list archive at Nabble.com.
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Krystian Szymukowicz
2013-01-24 20:33:29 UTC
Permalink
Post by bigbozo
Hi Udo,
PS: How do you work with this list? I don't get the grip of this
"mailinglist"-thing. I've just figured out how to answer because your
initial question got me running with FAL in flexform :)
Try a real newsreader instead of some www gateway:
http://typo3.org/support/mailing-lists/use-a-newsreader/

--
grtz
Krystian

Loading...