Include a "TestPage" with class A-B-D in Pages and classes on section X. Then configure embed section as shown below.
Page context : Use clipboard page, Class : A-B-D the class you want to include and which should be same as in Pages and classes, Clipboard page : TestPage, Section : Y in your case which you want to include.
Thanks for providing the screen shot which I found extremely useful.
Although I have defined TestPage with class A-B-D in Pages and Classes Tab on section X defined inside of class A-B-C, in the screen shot WHY do I need to specify it again in the section include? Shouldn't PEGA pick up the context as soon as I have defined the TestPage in Pages and Classes Tab? WHAT is the reason for defining it twice ... once in Pages and Classes Tab and again in the Class part of the Section Include screenshot?
1) the purpose of including TestPage in Pages and Calsses is to get the page context on the clipboard. It creates a clipboard page with class A-B-D.
2) The purpose of specifying it in section include is to specify system to take the available TestPage in the clipboard for the page context.
If you don not specify the page in pages and classes there will be no clipboard page available and the system will not be able to find the page context and moreover you can specify many pages in the Pages and classes but to make system to identify which page context it should take, we are adding in section include.
Specifying TestPage in Pages & Classes will not create the clipboard page. Pages specified in Pages & Classes are just design time elements used to resolve design time context references. This page is expected to be created and present on clipboard before the section is rendered.