shannah / xataface

Framework for building data-driven web applications in PHP and MySQL
http://xataface.com
GNU General Public License v2.0
138 stars 58 forks source link

Defining the description of records #125

Open tclela20 opened 2 years ago

tclela20 commented 2 years ago

Hello,

I have started using the new Xataface 3.0 and it looks good and works as expected. One thing I cannot seem to get running is the mobile list view. The heuristics gets the title field right, but it uses the title field for the description as well. I have tried to change this in the fields.ini and I cannot get it to change.

I added title=1 to another column and the title changes; however, when I add description=1 to another field it continues to show the presumed title vs the field I am trying to specify as the description.

Can anyone point me in the right direction to get this solved? I appreciate it in advance.

itmuecke commented 9 months ago

If you want to create your very own description , you can do that within tha tables class:

    class tables_tablename {
            function getDescription($record){
                    $duedate = date("d.m.Y", strtotime($record->strval('duedate')));
                    $flag = $record->htmlValue('flag');
                    $kat = $record->htmlValue('kategorie');
                    $desc = "$flag | $duedate | $kat";
                    return $desc;
            }
    }

This is just an example. You can build it like you want and need it.