Passing parent model to a child resource's create page
I have a
SeriesResource
with a ChapterRelationManager
and I want to create chapters in that series but the chapter has too many fields and I want a separate page for creating and editing chapter that's why I created a ChapterResource
.
I can easily link the create and edit button on ChapterRelationManager
table to ChapterResource
's create
and edit
pages but I'm having trouble passing the Series
to the create
page of ChapterResource
as the Chapter
belongs to a Series
and I must need the series record in order to create the chapter.
Any help would be appreciated.2 Replies
I presume you are overriding the default CreateAction on the RM with a url() action?
Yup, I'll be passing the IDs as route parameters but don't know how to define them.