Would it be possible to define the number of records per page directly in AppGini?
Currently, it could be modified in "parent-children.php" but it would be nice to not have to rechange it each time the app is generated with AppGini.
Best regards
Records per page
- D Oliveira
- AppGini Super Hero
- Posts: 347
- Joined: 2018-03-04 09:30
- Location: David
Re: Records per page
Unfortunately you still have to change it in the parent-children.php. There is no option like for the tableview (as shown above) for the child view's.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Records per page
Hi,
actually it might be easier. Let's think about it for a second. pbötcher mentioned parent-children.php and this we can utilize:
Peeking at parent-children.php you will find a php variable that contains all settings:
Aha - it's all in a variable! So, why not try this:
Define a new table where you allow setting the number of records for parenttable -> childtable. Then, when parenttable is being opened, use the /hooks/tablename.php -> _init function to read your user defined value and write that value into the variable.
Well, you might need to try where exactly the parent-children.php is read, but I suppose it's read once and used again and again.
This way actually each user could set his own desired records-per-page.
Just an idea.
Olaf
actually it might be easier. Let's think about it for a second. pbötcher mentioned parent-children.php and this we can utilize:
Peeking at parent-children.php you will find a php variable that contains all settings:
Code: Select all
$pcConfig = array(
'parenttablename' => array(
'someFieldName' => array(
'parent-table' => 'ecomo_location',
'parent-primary-key' => 'ID_Lo',
'child-primary-key' => 'ID_Co',
'child-primary-key-index' => 0,
...
'records-per-page' => 10,
'default-sort-by' => false,
...
),
Define a new table where you allow setting the number of records for parenttable -> childtable. Then, when parenttable is being opened, use the /hooks/tablename.php -> _init function to read your user defined value and write that value into the variable.
Well, you might need to try where exactly the parent-children.php is read, but I suppose it's read once and used again and again.
This way actually each user could set his own desired records-per-page.
Just an idea.
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view