Meddysong Posted January 13, 2019 Posted January 13, 2019 I'd like to work with some data in a Pages page. To do what I want (effectively output an equivalent to recordRow), I need to tell the system what I'm looking for. I know how to tell it what the database is: {{$database = \IPS\cms\Databases::load( 7 );}} I know how to tell it to consider that database's categories ( {{$roots = \IPS\cms\Categories7::roots();}} ) and by using a foreach loop on $roots can come up with the category title ( {$category->_title} ) and number ( {$category->_id} ). The next trick is to run a foreach loop on each particular category to bring out its rows. And that's where I'm stuck. I can't work out how to identify the rows for a particular category. Could anybody kindly offer a pointer, please?
newbie LAC Posted January 14, 2019 Posted January 14, 2019 {{$class = 'IPS\cms\Records' . $database->id;}} {{$rows = $class::getItemsWithPermission(array(array("category_id=?", $category->_id)));}}
Recommended Posts
Archived
This topic is now archived and is closed to further replies.