If you created a webtemplate based on any Site Definition (Team Site…) and if you comment the navbars part
1: <NavBars>
2: <!--<NavBar Name="$Resources:core,category_Top;" Separator="&nbsp;&nbsp;&nbsp;" Body="<a ID='onettopnavbar#LABEL_ID#' href='#URL#' accesskey='J'>#LABEL#</a>" ID="1002" />
3: <NavBar Name="$Resources:core,category_Documents;" Prefix="<table border='0' cellpadding='4' cellspacing='0'>" Body="<tr><td><table border='0' cellpadding='0' cellspacing='0'><tr><td><img src='/_layouts/images/blank.gif' id='100' alt='' border='0'>&nbsp;</td><td valign='top'><a id='onetleftnavbar#LABEL_ID#' href='#URL#'>#LABEL#</td></tr></table></td></tr>" Suffix="</table>" ID="1004" />
4: <NavBar Name="$Resources:core,category_Lists;" Prefix="<table border='0' cellpadding='4' cellspacing='0'>" Body="<tr><td><table border='0' cellpadding='0' cellspacing='0'><tr><td><img src='/_layouts/images/blank.gif' id='100' alt='' border='0'>&nbsp;</td><td valign='top'><a id='onetleftnavbar#LABEL_ID#' href='#URL#'>#LABEL#</td></tr></table></td></tr>" Suffix="</table>" ID="1003" />
5: <NavBar Name="$Resources:core,category_Discussions;" Prefix="<table border='0' cellpadding='4' cellspacing='0'>" Body="<tr><td><table border='0' cellpadding='0' cellspacing='0'><tr><td><img src='/_layouts/images/blank.gif' id='100' alt='' border='0'>&nbsp;</td><td valign='top'><a id='onetleftnavbar#LABEL_ID#' href='#URL#'>#LABEL#</td></tr></table></td></tr>" Suffix="</table>" ID="1006" />-->
6: </NavBars>
7: <Configurations>
You might get this error when you create the SiteCollection :
“Object reference not set to an instance of an object.”
You guessed well, all you have to do is to uncomment those line, and prefer to delete it instead of commenting it.
You could also modify the navbar by custom code attach to a feature (with a feature receiver), in order to modify the web template navigation.
- Advertisement -