[TYPO3-project-formidable] New property db to load items from a database table

Manuel Rego Casasnovas mrego at igalia.com
Fri Jan 2 15:11:08 CET 2009


Hello,

I've just done the commit after talk with Jerome, and this new property
is available from revision 289.


Some examples:
<renderlet:LISTBOX name="user" label="User">
   <db>
       <table>fe_users</table>
   </db>
</renderlet:LISTBOX>

It will show a list of users, it gets the caption from
TCA/fe_users/ctrl/label (in this case "username") and for value it will
use the "uid".


You could define your own values for caption property:
<renderlet:LISTBOX name="user" label="User">
   <db>
       <table>fe_users</table>
       <caption>name</caption>
   </db>
</renderlet:LISTBOX>

and value property:
<renderlet:LISTBOX name="user" label="User">
   <db>
       <table>fe_users</table>
       <value>username</value>
       <caption>name</caption>
   </db>
</renderlet:LISTBOX>


The last example is with static tables:
<renderlet:LISTBOX name="country" label="Country">
   <db>
       <table>static_countries</table>
       <static>true</static>
   </db>
</renderlet:LISTBOX>

It will get the name of the countries in the user language
automatically.


I hope you find this new feature as useful as me.


Best regards,
   Rego

-- 
Manuel Rego Casasnovas
Computer Science Engineer
mailto:mrego at igalia.com
Tel: +34 986 10 76 10
Fax: +34 981 91 39 49
Igalia - http://www.igalia.com


More information about the TYPO3-project-formidable mailing list