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

Manuel Rego Casasnovas mrego at igalia.com
Fri Jan 2 12:19:07 CET 2009


On Fri, 2009-01-02 at 10:36 +0100, Manuel Rego Casasnovas wrote:
> Hello,
> 
> I've added a new property "db" that allows to fill items (a patch is at
> [1]), for example in a listbox:
> <renderlet:LISTBOX name="user" label="user">
>    <readonly>true</readonly>
>    <db>
>       <table>fe_users</table>
>       <value>uid</value>
>       <caption>username</caption>
>    </db>
> </renderlet:LISTBOX>
> 
> This will show the list of frontend users, and the uid of that users
> will be stored on field "user" of your table.
> 
> "db/value" is optional, if you don't use it "uid" fild will be used.
> 
> I don't know if you think that this property is or not useful. But, I'm
> thinking on improve it a little more to be used for static tables.
> 
> I'd like to have something like:
> <renderlet:LISTBOX name="country" label="country">
>    <readonly>true</readonly>
>    <db>
>       <table>static_countries</table>
>       <value>uid</value>
>       <static>true</static>
>    </db>
> </renderlet:LISTBOX>
> 
> Where the listbox will be filled with country names based on current
> user language (getting the country name from the different
> static_info_tables extensions that are installed).
> 
> However, I'm not sure about the name of the property "db/static" maybe
> another way to define it could be better.
> 
> What do you think?

I've already implemented it using the property "db/static", however I
can change it if you don't like.

Now I can have a listbox with all the countries, with the next XML:
<renderlet:LISTBOX name="country" label="Country">
   <db>
     <table>static_countries</table>
     <static>true</static>
   </db>
</renderlet:LISTBOX>

The new patch at:
http://pastebin.com/f11447516

Bye,
   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