I need a new layout based on a parent of a child node template, but I am created the node at the child's level and it is inheriting content that I don't want in the template. Is there a way to override content that is added in at the parent template level within a child of that parent?
Assuming you are using razor for your templates/views, you could use sections. For example, your parent template could have the following to see if a section has been defined by any it's children. If not, default content could be displayed.
Confused About Nested Templates
I need a new layout based on a parent of a child node template, but I am created the node at the child's level and it is inheriting content that I don't want in the template. Is there a way to override content that is added in at the parent template level within a child of that parent?
Hi Steve,
Assuming you are using razor for your templates/views, you could use sections. For example, your parent template could have the following to see if a section has been defined by any it's children. If not, default content could be displayed.
If you did not want default content within your child template, you could add the following section to your child template.
Thanks, Dan.
is working on a reply...