Jump to content

Creating $rows based on a known category


Meddysong

Recommended Posts

Posted

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?

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...