How can I paginate an associated model?

Leave parenthesis blank:

$query = $subsites->find()
                                ->where(['Subsites.name' => $subsite])
                                ->contain(['News']);

Something like that. In one of mine I use a custom pagination and looks like:

$query = $dogs->find()
                ->where(['adopted' => 0])
                ->orderAsc('sex')
                ->orderDesc('lastedit')
                ->limit($rowsperpage)
                ->page($pg);