I need some guidance to figure out creating and placement of some shapes.
Here is the story: I have a part that keeps some user data (say MyUserDataPart). Another part that's attached to BlogPost (AdditionalPostDataPart). In the home page, I have a projection of recent blog posts. What I want is:
1- At home page, show user data in the projection for every blog post
2- In the blog page, show the user data only once at top
3- In the blog post page, again show the user data only at once at top
To add the user data to the blog post I did this in AdditionalPostDataPart driver:
protected override DriverResult Display(AdditionalPostDataPart part, string displayType, dynamic shapeHelper)
var blogOwner = part.As<BlogPostPart>().BlogPart.As<CommonPart>().Owner.ContentItem;
ContentShape("Parts_AdditionalPostData", () =>
// stuff here
ContentShape("Parts_MyUserData", () =>
Using BuildDisplay this way doesn't feel right but user data shape is rendered in the projection at home page. I can't figure out how to hide it in blog and blog post pages though. Also, I couldn't find a way to show it once at the top in these pages.