Multiple Infolists on ViewRecord

I want to use multiple infolists on a viewrecord page so that i can specify a different ->record() on each one as i am reusing infolists on other resources. You can do mulitple forms with getForms(), but i dont see a getInfolists() method. Is my only option overriding the view and setting up multipel ones that way? I would prefer not to do that. I guess the other option is doing infolists in widgets maybe? Just thought of that while i typed this out. Though a bit less control on placement that way.
4 Replies
Matthew
Matthew2w ago
You want to show an infolist from more than one record, on a single record view ?
awcodes
awcodes2w ago
Yea. This doesn’t make sense outside of a relationship. The record is the record and it has its associated data.
Mark Chaney
Mark ChaneyOP2w ago
Yes, but I’m reusing infolists and with typing, you have to make sure you are passing the right model to each one.
Matthew
Matthew2w ago
Can you put a bit of code up, I'm struggling to see the issue you are facing. If you're just re-using infolists, I can't see the difficulty, and why you're having to pass models. So perhaps you're doing something else.

Did you find this page helpful?