[TYPO3-mvc] Blank Flexform fields overwrite TypoScript values???
roberto blanko
robertoblanko at gmail.com
Mon Feb 22 17:46:34 CET 2010
Hey guys (including girls),
I've got the following issue and I don't know if I discovered a bug (or
simply inconvienent behaviour) or if it's just me being way too dumb to get
it right.
I'm setting up my template path via TypoScript like this:
Setup:
plugin.tx_myext.view.templateRootPath =
{$plugin.tx_myext.view.templateRootPath}
Constants:
plugin.tx_myext.view.templateRootPath =
EXT:myext/Resources/Private/Templates/
So far so good. Work's like it should. I can overwrite the path using
TypoScript. Now I want to make the TS path over-writable within the flexform
of the plugin, which should be possible using these lines:
<el>
<view.templateRootPath>
<TCEforms>
<label>LLL:EXT:myext/Resources/Private/Language/locallang_flex.xml:misc.templateRootPath</label>
<config>
<type>group</type>
<internal_type>folder</internal_type>
<maxitems>1</maxitems>
<size>1</size>
<multiple>0</multiple>
</config>
</TCEforms>
</view.templateRootPath>
</el>
So far, so good. Again I can overwrite the TS settings with my definition in
the plugin's flexform. BUT: There's one big downside: Once I've saved the
flexform, the TypoScript value is overwritten - no matter if the flexform
field is empty or not. Of course, if the according flexform field is empty,
the TS setup should NOT be overwritten. But it IS. And therefore no template
is found. What's going wrong here?
In other words, I'm expecting the following bahaviour in pseudo PHP code:
if (isset($flexform['field']) && !empty($flexform['field'])) {
// Use flexform value
} else {
// Use TS value
}
Currently it seems to be working like this (which is not good):
if (isset($flexform['field'])) {
// Use flexform value
} else {
// Use TS value
}
I really appreciate any help!
More information about the TYPO3-project-typo3v4mvc
mailing list