Re: [Dan Maitland] sub categories on detail page
I do, there's a few ways to do it. Category section have a field called 'parentNum' that lists the record number of their parent.
So the first step is getting the record number of the current record. You may have that in a variable such as $record['num'] so you can use that or the following line:
$num = $record['num'];
or
$num = getNumberFromEndOfUrl();
Then generate some list viewer code and add a where of "num = '$num'" like this:
list($categoryRecords, $categoryMetaData) = getRecords(array(
'tableName' => 'category',
'where' => " num = '$num' ",
));
And that will list only the "child" record of the current record.
Hope that makes sense. Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com