I am trying to make my app more user friendly and easier to navigate about in using urls.
Here is the situation. I have nested, related tables. I want a user to be able to enter any one of the tables and then easily go to related records in the other tables. e.g.
table1 -> tableB -> tablex
-> tabley
-> tablez
If a user looks at entries in tablex, I want to be able to go to the parent record in tableB -- or the grandparent in table1.
If I startout by entering table1 and descending down through related records, then I can make my way back by using:
$query =& $app->getQuery();
$x = $query['my_id_var'];
However, if one just goes straight into a child table, then I can't sort out how to get my hands on the variable values in a record to jump to another related table.
E.g. I want to put something in block__after_record_footer() that will reference values in the currently viewed record, permitting easy navigation to wherever. Yet the only thing I can get is the cursor value (i.e. $query['-cursor']). Using $query['my_id_var'] returns empty. And if I try:
function block__after_record_footer(&$record) {
...
$x = $record->val('my_id_val');
}
I just get an error.
???
Thanks.