View Single Post
  #1 (permalink)  
Old March 5th, 2009, 10:10 AM
Will Will is offline
Friend of Wrox
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts
Default Base Page and Master Pages

In reading your book I have a question regarding Master Pages and Base Pages.

I read a thread in this forum where you describe Master Pages as defining the look and feel and the Base Page for the functionailty.

You then give an example of adding meta tags to the base page and then all the other pages inherit this functionality.

My question is can you not just do that in the Master Page?

I am working on a site at the moment and I have only used master pages as up until now I had overlooked the Base Page but the post has made me think about if there is a better way to go about it.

Basically in my master pages I have the basic structure for the website which I want all the other pages to inherit to keep the consistent look throughout. This is then linked to the a stylesheet which determines how the page should be styled. Great so now I have a nice styled consistent looking site.

Yesterday I created a google analytics account which requires you to put some javascript in your page so it can be tracked which is fine. Now I put it in my 2 master pages and it works no problem, but if I had set a base page for the project I could of just put it once in there and had the master pages inherit the functionality from the Base Page. I think in the book you have the Base page do that title tag empty check?

Is this the basic Idea of it?

Stylesheets for styling-widths, decoration etc?
Master Pages for structure-divs, content etc?
Base Pages for functionality-the title check thing you do, additional Javascript etc?

I only ask because up until now the point of a base page had eluded me because I was just updating my master pages and I just want to check that this understanding of it is correct?

And is this the best practice to seperate your styles, content and functionality this way?

Thanks in advance