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:
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,
...
),
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