Portal page definitions

At present, the Fees doctype (Education) doesn’t have a portal page defined, despite being listed on the portal. I thought I’d try to fix that, but after two hours of digging through the code for the Sales Order doctype I’m more confused than when I started.

In particular, I’m stuck on two questions:

  1. How do I customize the portal-based listview? Right now, I’m stuck with this, which correctly selects fees documents per student but isn’t very informative.

  2. Next, how do I capture the links in the listview to a specific template? At present, the links try to go to a view driven by desk-based permissions, which isn’t viable because of how document ownership works.

Thanks in advance for any help!