[TYPO3-english] flexform renderMode=tree in combination with tx_templavoila array

Dennis Rochel dennis.rochel at gmail.com
Wed Apr 6 12:05:43 CEST 2016


Hi guys,

I want to create a flexform configuration with an categories tree "picker". That works like a charm if I use it on top of the flexform configuration like:


<T3DataStructure>
	<meta>
		<langDisable>1</langDisable>
	</meta>
	<sheets>
		<sDEF>
			<ROOT>
				<TCEforms>
					<sheetTitle>LLL:EXT:strgb_tagging/base/locallang.xml:strgb_tagging_base_flexform</sheetTitle>
				</TCEforms>
				<type>array</type>
				<el>

					<categories-list>
						<TCEforms>
						  <exclude>1</exclude>
						  <label>Categories</label>
						  <config>
							<type>select</type>
							<autoSizeMax>50</autoSizeMax>
							<foreign_table>sys_category</foreign_table>
							<foreign_table_where> AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.title ASC</foreign_table_where>
							<maxitems>9999</maxitems>
							<renderMode>tree</renderMode>
							<size>10</size>
							<treeConfig>
								<appearance>
									<expandAll>1</expandAll>
									<showHeader>1</showHeader>
								</appearance>
								<parentField>parent</parentField>
							</treeConfig>
						  </config>
						</TCEforms>
					</categories-list>

				</el>
			</ROOT>
		</sDEF>
	</sheets>
</T3DataStructure>


But as soon as I place the <category-list> definition inside a tx_templavoila block like:

<config-tagging>
   <tx_templavoila>
      <title>LLL:EXT:strgb_tagging/base/locallang.xml:strgb_tagging_tagging</title>
   </tx_templavoila>
   <type>array</type>
   <section>1</section>
   <el>
          // PLACE <categories-list> BLOCK RIGHT HERE!
   </el>
</config-tagging>


The tree-view gets not rendered. I assume that this error occurs because the javascript tries to draw the tree as soon as the form gets rendered. But this specific tree-DOM element isn't placed inside the document before one tx_templavoila element was added to the config on the fly.

Does somebody has an idea what I can do to get the tree renderMode working inside such a dynamic templavoila flexform configuration?


More information about the TYPO3-english mailing list