16 Aug 2010
26 Apr 2011
Link to this post
I have created a set of nested master pages in an attempt to reduce duplicate code in my layouts.
My "main.master" consists of one big area in the middle (a ContentPlaceHolder), and three ContentPlaceHolders across the bottom in my footer. It also has a common header that is the same on every page of the site.
I have a secondary master page that uses "Main.master" as it's master page. This one has two ContentPlaceHolders within the main ContentPlaceHolder. This creates two columns within my secondary master page. Because it is within main.master, though, my header will show on any page that uses this template, as well.
Now, all that being said, the problem this:
I created a page that uses "secondary.master" as its template. This exposes the two ContentPlaceHolders from secondary.master, as well as the three footer ContentPlaceHolders that have been inherited from Main.Master. When I put drop a control into one of the column placeholders, the content shows up perfectly and in the right place. When I put a control into one of the footer placeholders, the content does not show up in the right place. It shows up somewhere else within the secondary.master.
Since the drop zones showed up correctly in the admin from both secondary.master and main.master I figured this would be an acceptable design for my pages. Is this not the case? Is this a known bug? Or is there a way to fix this?