Or, if you're working in a template, you can just use <% loop $MyObjects %> do some stuff <% end_loop %>

To get the objects from inside the Page class scope, you can just use $this->MyObjects() which will return a DataList

That's obviously a one-many relation... there are others

and in your DataObject subclass you'd have:

  1. private static $has_one = [ 'Page' => MyPageClass::class ];

In your Page subclass, you'd have something like:

  1. private static $has_many = [ 'MyObjects' => MyDataObject::class ];

You add a relation between the page class and the dataobject class.

So, in that case, you'd want:

A subclass of DataObject which contains the information A subclass of Page which is the custom page type

you may need: A subclass of PageController if you need to do anything clever with the request