Can a controller view render into multiple zones? #9373
Unanswered
kevinsmgov
asked this question in
Q&A
Replies: 1 comment 19 replies
-
Controller's To target the Layout zone prefix zone with |
Beta Was this translation helpful? Give feedback.
19 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a site with a complex theme and placement.json file. Different content types render their parts and fields into several different zones in the layout.
I am trying to create a controller to produce custom results based on URL query parameters and I need the results to behave like my existing content types and render with my existing razor templates, following the rules in my existing placement.json file.
To some extent, this works. The controller's resulting viewmodel contains a number of different shapes that present themselves as known parts and fields and those parts and fields render with their expected razor templates. However, it seems like the placement.json file is ignored in the case of the controller's results and everything renders within the Content zone.
It may be that there are additional properties I need to set with the shapefactory in the controller relative to each of the content parts and fields I am returning but I haven't been able to determine what additional properties in the shapes are necessary.
Beta Was this translation helpful? Give feedback.
All reactions