This project is read-only.

ContentPlaceHolders, how are they used in Top+SubMenu.Master?

Nov 27, 2008 at 4:43 PM
I'm curious about how the ContentPlaceHolders are used in the master page. It seems that the default content concept has really been taken to it's limit. I want to understand how it is used by the rest of the pages so that I can keep as much of functionality as possible while having a custom Master.

Looking at ContentPlaceHolder with id="Top" it seems like it could be used for completely removing the header right? Besides removing the header, is it intended for introducing a differently layouted header as well? There is a control named Top.ascx in the source, Is that one in use?

Besides asking here and browsing the source by searching for keywords, are there any better way of understanding of what is used where?
Are there any design thoughts documentation for this, or are there some systematic naming scheme for parts that could be used for understanding the relations between the components? Where I work I'm spoiled with a roughly 30% comment percentage in the code. :)

One last question, are there javascripts that requires some specially id elements in the master or content pages for the admin gui?
Nov 27, 2008 at 8:14 PM
Hi Carl46,
i have not too much experience, but i've been seeing the placeholders, and is what you say, the Top.ascx is the one it uses, also the subMenu.ascs and the topMenu.ascx are used too. The "Menu" ContentPlaceHolder is meant to be at the left, with the droppable zones left, recurvie left and site left. The SideBar ContentPlaceHolder is at the rigth, and the Content ContentPlaceHolder is in the middle, with a PreContent at the beginnnig, the Content in the middle and the PostContent at the end. You have to be careful of what ContentPlaceHolder you delete because some of the items you can insert uses some of this concent and you can get an error. I hope this helps.
Nov 27, 2008 at 11:27 PM
Hi, I added some examples/tests on how each content areas would behave if is used. I hope it can give some hints.
Nov 28, 2008 at 4:17 PM
The content placeholders simply defines what "Zones" are avaliable in the admin gui. Great! :)
Nov 28, 2008 at 4:21 PM
But what about the "PageWrapper"? When is the whole page replaced?
Nov 29, 2008 at 8:45 PM
It's not used anywhere. Use it if you want to keep the top part but want to redefine the rest of the page.
Dec 1, 2008 at 11:12 AM
Here's an image with the content areas displayed. I just added a few div's to the master and a css file to the theme. Maybeuseful for the documentation?Image Hosted by ImageShack.us
Dec 1, 2008 at 5:47 PM
Edited Dec 1, 2008 at 5:47 PM
Nice. I hope you don't mind me adding it to the wiki.
Dec 2, 2008 at 7:26 AM
Of course not. :)