Andrew Connell [MVP SharePoint]
1730 Posts |  46 Articles |  5281 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
AC's Blog Quick Links
SharePoint Quick Links
Article Categories
Archives
February, 2012 (4)
January, 2012 (12)
December, 2011 (6)
November, 2011 (3)
October, 2011 (17)
September, 2011 (8)
August, 2011 (6)
July, 2011 (7)
June, 2011 (13)
May, 2011 (9)
April, 2011 (15)
March, 2011 (1)
February, 2011 (6)
January, 2011 (5)
December, 2010 (11)
November, 2010 (6)
October, 2010 (12)
September, 2010 (5)
August, 2010 (4)
July, 2010 (5)
June, 2010 (6)
May, 2010 (11)
April, 2010 (11)
March, 2010 (9)
February, 2010 (9)
January, 2010 (3)
December, 2009 (10)
November, 2009 (15)
October, 2009 (15)
September, 2009 (7)
August, 2009 (4)
July, 2009 (10)
June, 2009 (8)
May, 2009 (2)
April, 2009 (9)
March, 2009 (6)
February, 2009 (16)
January, 2009 (6)
December, 2008 (12)
November, 2008 (12)
October, 2008 (27)
September, 2008 (13)
August, 2008 (14)
July, 2008 (14)
June, 2008 (12)
May, 2008 (23)
April, 2008 (12)
March, 2008 (15)
February, 2008 (13)
January, 2008 (12)
December, 2007 (10)
November, 2007 (8)
October, 2007 (15)
September, 2007 (20)
August, 2007 (21)
July, 2007 (16)
June, 2007 (8)
May, 2007 (25)
April, 2007 (16)
March, 2007 (18)
February, 2007 (18)
January, 2007 (12)
December, 2006 (16)
November, 2006 (13)
October, 2006 (18)
September, 2006 (22)
August, 2006 (27)
July, 2006 (23)
June, 2006 (23)
May, 2006 (23)
April, 2006 (9)
March, 2006 (17)
February, 2006 (15)
January, 2006 (23)
December, 2005 (31)
November, 2005 (32)
October, 2005 (38)
September, 2005 (53)
August, 2005 (30)
July, 2005 (63)
June, 2005 (30)
May, 2005 (59)
April, 2005 (29)
March, 2005 (74)
February, 2005 (27)
January, 2005 (22)
December, 2004 (32)
November, 2004 (42)
October, 2004 (39)
September, 2004 (20)
August, 2004 (14)
July, 2004 (27)
June, 2004 (40)
May, 2004 (5)
April, 2004 (6)
March, 2004 (16)
February, 2004 (26)
January, 2004 (23)
December, 2003 (7)
November, 2003 (14)
October, 2003 (20)
September, 2003 (4)
Post Categories
Add to Technorati Favorites

Managed Windows Shared Hosting

Earlier this year I blogged about how you don't need to create site definitions. The gist of that post was this:

  • Custom site definitions are not very flexible and hard to create/debug.
  • Create lightweight site definitions; in essence copies of Blank Site with a new name & ID, but nothing else.
  • Create Features and staple them to the new site definition you just created.
  • This process allows for effectively changing the site definition down the road via adding/removing stapling Features.

I don't take the same approach as some others who've blogged. Funny... one guy got a ton of feedback for his black/white post on this subject a month or so ago and then rewrite the post. Quite amusing it looks almost identical to mine earlier this year... even the title is very similar!

At any rate, I still get questions about how I like to create new Publishing sites. Seems people have taken that blog post I did earlier this year along with Ch5 in my book that demonstrates how to create what I call a "Minimal Publishing Portal" site definition, and taken these positions a bit too literally. So... let me try to clear it up...

When you're creating a new Publishing site, I'd argue that what you want is the Publishing Portal site definition included in the MOSS 2007 installation... EXCEPT you don't want the extra master pages, CSS, images, page layouts, content types and subsites. You want the two site templates Publishing Site & Publishing Site with Workflow and one content type, page layout and page for the homepage of the site... but nothing else.

That's what I create in my book (note: if you use that site def, make sure you check the book errata for fixes on that chapter and the code). But, I don't use it as is. Instead, I use it as a starting point. For real projects I do the following:

  • Create a copy of that Minimal Publishing Portal site definition
  • Give it a new name & ID
  • Optionally (but usually) create a Feature that includes the core branding of the site (master page(s), CSS, images, etc) named something like "ProjectBranding" & then create another stapling Feature "ProjectBrandingStapling" that attaches the brand to the core site template used as the root template in the Minimal Publishing Portal site definition

The difference here is that when you look at my environment, you don't see "Minimal Publishing Portal" as an option... you only see the site definition(s) I've created that used the Minimal Publishing Portal as a starting point.

Hope that clears some stuff up with folks...

posted on Saturday, December 06, 2008 4:20 PM

Feedback

# re: Using a Minimal Publishing Site Definition in the field 12/9/2008 12:24 PM Madhawa
Gravatar Andrew,

I'm a newbie and this might be a stupid question.
When we are deploying we just create a publishing site by using the default publishing site site template and after that we add features. Is it a good way?

# re: Using a Minimal Publishing Site Definition in the field 12/9/2008 1:33 PM AC [MVP MOSS]
Gravatar Madhawa-
That works... the only downside is you have all the extra branding the Publishing Portal site def gives you.

# re: Using a Minimal Publishing Site Definition in the field 12/12/2008 12:52 AM Madhawa
Gravatar Thanks Andrew, yeah we have to remove extra branding afterward which is a extra work.

# re: Using a Minimal Publishing Site Definition in the field 12/12/2008 1:03 AM Madhawa
Gravatar And if we use customized master page we can get rid of extra branding right?

# re: Using a Minimal Publishing Site Definition in the field 5/27/2009 5:25 AM Kieran
Gravatar Hi Andrew,

How would you approach this situation using site definitions?

I need to create a new site, with 5 sub-sites below it. Each site will contain very similar lists, web parts etc.. I need to create it on my dev image and then roll it to production after testing. Would I just move the site definition to production as a .wsp and then create it again?

Thanks for any pointers.

# re: Using a Minimal Publishing Site Definition in the field 5/27/2009 10:42 AM Kieran
Gravatar Hi Andrew

Just a (hopefully) quick question about your minimal site definition code. I've installed the .wsp and created a new site collection based on it. When I try to create a new page within the site, I get the following error:

Only Content controls are allowed directly in a content page that contains Content controls

I tried creating one of the sub-sites and also in those I get the same error.

I also noticed that when I click the main navigation tab on any of the sites created from this definition, the page it's looking for cannot be found - is this by design?

Do I need to carry out some extra steps after deploying and creating a new site collection to the get this to work?

Would appreciate your feedback.

K

# re: Using a Minimal Publishing Site Definition in the field 5/28/2009 11:20 AM Kieran
Gravatar Hi Andrew,

I've been doing some investigating into the issues I mentioned above (after all, just because you created this doesn't make it your problem! :) ) and it seems that when I replace the minimaltmp.aspx with a different page layout things start to work okay. Has anyone else had an issue with this?

I also noticed that the default.aspx page hadn't been deployed into the Pages folder after creating the new site collection. I added it manually and the home tab link started to work.

Would appreciate your thoughts on this.

All the best
Kieran

# re: Using a Minimal Publishing Site Definition in the field 5/28/2009 9:04 PM AC [MVP MOSS}
Gravatar Kieran-
The code download from the WROX site, as well as content in the book contains some errors... please make sure you check the book errata. The error you're getting is in the page layout as the content placeholder control is in lower case rather than the correct <asp:ContentPlaceholder> case.

# re: Using a Minimal Publishing Site Definition in the field 7/15/2009 12:58 AM Craig
Gravatar Thanks for the post Andrew. This will help clear up some of he confusion. Also, I have noticed that the Minimal Publishing Site Definition download from WROX has some issues.

I found that if I download the Minimal Publishing Site Definition form WROX and applied the changes the at the bottom of the web page listed below that I was able to clear up these issues.

http://andrewconnell.com/blog/articles/ProSharePoint2007WebContentManagementDevelopment.aspx

Although, I do have one other question about using your Minimal Publishing Site Defintion for real projects. You mention that in a real project you need to give it a new name and ID. When you say ID do you mean new solution ID or do you also mean feature ID?

For now I am assuming new solution and feature ID's but some insight into this would be helpful. Thanks.


# re: Using a Minimal Publishing Site Definition in the field 7/15/2009 6:59 AM AC [MVP MOSS]
Gravatar Site definition ID... not Feature or solution ID. For instance, I don't call real ones "PublishingMinimal".

# re: Using a Minimal Publishing Site Definition in the field 6/1/2010 6:08 PM Michael
Gravatar Andrew,

The navbar link refers to Pages/default.aspx but the default page is located @ the root level. How do i get default.aspx provisioned to Pages dir where the link expects it to be.

# re: Using a Minimal Publishing Site Definition in the field 6/7/2010 6:59 AM AC [MVP SharePoint]
Gravatar @Michael - You don't provision it like a traditional SharePoint site... instead create the page programatically as it should be located in the Pages library and managed as content. Check this link for some help: www.andrewconnell.com/.../5168.aspx

# re: Using a Minimal Publishing Site Definition in the field 6/21/2010 9:18 PM Michael
Gravatar Hi Andrew,

This works perfectly. However, I really want a minimal collaboration publishing page. What features do I have to include to get the "Show page Editing toolbar" and the Publishing features to show when I select edit page. I have tried stapling and manually activated all publishing features starting from you min pub page and they don't show.

regards,

# re: Using a Minimal Publishing Site Definition in the field 9/21/2010 3:55 PM AD
Gravatar Hi Andrew,

Will the out of the box content deployment tool work with this? From my research it seems like in order for content deployment to work the site needs to be based on the blank template. What options do we have?

# re: Using a Minimal Publishing Site Definition in the field 9/24/2010 6:08 AM AC [MVP SharePoint]
Gravatar @AD - Sure it will work. CDS will work on any site template. What you're seeing is that it is best for the destination site collection to be empty (the documentation indicates it should be based on Blank, but it really should be an empty site collection with no template applied.)

Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 1 and 8 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelevant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2012 Andrew Connell
Creative Commons License 
This work is licensed under a Creative Commons License
Site design by Heather Solomon.

 
 
SharePoint 2010 Training
Looking for SharePoint 2010 training for developers, administrators, SharePoint Designer 2010 and end users? Look no further! My company, Critical Path Training offers the best SharePoint training around!