[TYPO3-project-formidable] SVN revision 107: Typoscript driven

Jerome Schneider j.schneider at ameos.com
Tue Aug 14 12:50:51 CEST 2007


Hello list,


Starting at revision 107, Formidable provides new features that allow 
you to drive your applications with Typoscript

New features:
   -> 2 new Typoscript content objects (aka cobj):
   	FORMIDABLE	=>	content is cached
	FORMIDABLE_INT	=>	content is not cached

	This means that you can render a formidable on a page without any 
fe-plugin (ex: you can attach a FORMIDABLe cObj to a templavoila 
lib.something in your TS template)

   -> 2 new generic fe-plugins, taking path of TS-config in flexform
	tx_ameosformidable_pi1	=> type USER, content is cached
	tx_ameosformidable_pi2	=> type USER_INT, content is not cached

	This means that you can define a TS-config for formidable, and render 
it directly in a content-zone of a page without having to provide your 
custom fe-plugin

   -> a new method initFromTs() that allow you to manually init 
Formidable in your custom-plugins with TS config instead of XML




Examples of TS config: ( remember: FORMIDABLE cObj means cache, 
FORMIDABLE_INT cObj means not cached )

#CODE===============================================================
config.my_form = FORMIDABLE
config.my_form {
	version = 0.7.107
	meta {
		name = My form Human name
		form.formid = myform_id
		displaylabels = true
		debug = false
	}
			
	control {
		datahandler = datahandler:VOID
		renderer = renderer:STANDARD
	}
			
	elements {
		10 = renderlet:BUTTON
		10.label = Click me
		10.onclick {
			runat = ajax
			userobj.php (
				return $this->majixDebug("Hello !");
			)
		}
	}
}
#END OF CODE--------------------------------------------------------




Now assuming that you have a templavoila defining lib.something, you can do:

#CODE===============================================================

lib.something < config.my_form

#END OF CODE--------------------------------------------------------

And your formidable will be rendered by TV



To take advantage of the inheritance feature of the TS, Formidable comes 
with some TS-preconfigurations, to lessen the amount of code to write

This way, our above exemple becomes ( renders the same ):

#CODE===============================================================
config.my_form = FORMIDABLE
config.my_form < config.tx_ameosformidable.quickconf.nodb
config.elements {
	10 = renderlet:BUTTON
	10.label = Click me
	10.onclick {
		runat = ajax
		userobj.php (
			return $this->majixDebug("Hello !");
		)
	}
}
#END OF CODE--------------------------------------------------------

As of rev 107, only a dummy preconf using renderer:STANDARD and 
datahandler:VOID (called nodb) is featured; more preconf will come in 
future revisions

They're stored in the TS at config.tx_ameosformidable.quickconf
And defined in ext_typoscript_setup.txt



We think that TS will open great new perspectives to the usage of 
Formidable in TYPO3. The flexibility confered by Typoscript cObjs will 
allow to use Formidable in a 
much-more-atomic-way-much-less-monolithic-way that the so far so good 
XML+fe_plugin couple can offer.

But of course, the XML way to drive Formidable is still and always will 
be fully working, as it has proven to be rocksolid and perfect for 
large-scale applications.


Links to:
   * zip of SVN build rev 107: 
http://www.ameos.com/fileadmin/formidable/builds/svn/svn-rev-0107-ameos_formidable.zip

   * rev 97 to 107 changelog: 
http://www.ameos.com/formidable/svn/changelog-revision-97-to-107.html




Best regards,
Jerome Schneider


More information about the TYPO3-project-formidable mailing list