Posted by ken zheng on October 20, 2008
This actually takes me an hour to figure out. If you create a site based on team site template, you cannot create a publishing page by default.
At the first we need to go to “Site Settings”. There we click on “Site collection features“. We need to enable the feature “Office SharePoint Server Publishing Infrastructure“. This will enable publishing structure on site collection level and is needed before we are gonna enable the publishing feature at site level.
Next we go again to “Site Settings” and click on “Site features“. There we enable the site feature “Office SharePoint Server Publishing“. After enabling both features your created site will have publishing capabilities.
Be aware, one feature is on Site Collection the other one is on Site
Here is the topic show you how to convert your Team Site to a Publishing Site
Posted in Sharepoint | Tagged: Publishing Feature | Leave a Comment »
Posted by ken zheng on October 20, 2008
* Why can’t I create Blogs, Wikis, Team Sites or Blank Sites in my Publishing site collection (created with the Publishing Portal site template)?
* Why can I only create certain pages in the Search Center site in my Publishing site?
To cut to the chase, you actually can do this. What the SharePoint team did was provide a way for us to filter what site templates are available to use when creating subsites within specific sites as well as filter which page layouts are available on a site by site basis when our content owners create pages. Out of the box, site collections created using the Publishing Portal site template can only contain other sites created using the Publishing Site or Publishing Site with Workflow site templates. This filtering is implemented by the Publishing site definition. However it is very easy to change.
Go into any Publishing site’s Site Settings page and look under the Look & Feel column for the Page Layouts & Site Templates link. From this page you’ll be able to do the following:
* Inherit the parent site’s settings for site templates & page layouts.
* Turn off all filtering for the site templates & page layouts that are available to content owners and hierarchy managers (those who can create subsites… aka: manage the site topology).
* Turn on filtering and customize the site templates & page layouts that are available to content owners and hierarchy managers.
Posted in Sharepoint | Tagged: site templates | 1 Comment »
Posted by ken zheng on October 20, 2008
If you are a business decision maker, system or solution architect, IT manager, site manager, Web developer, or Web designer, this content will help you envision the entire process of planning and implementing both an Internet presence site based on SharePoint Server 2007 and the infrastructure and operations necessary to host and support it in an enterprise. It outlines the steps for site-related and infrastructure-related tasks in an interwoven manner, to suggest a useful order in which to coordinate tasks across the Infrastructure and Site-development teams.
Here is a link to the scenario content and here is a link to the downloadable poster.
Posted in Sharepoint | Tagged: Sharepoint 2007 | Leave a Comment »
Posted by ken zheng on October 20, 2008
Follow MOSSLover’s blog, I managed to get Quick Launch Bar with Slider.
just paste the following script in your default.master page
var _Menus = [];
_Menus.push(“zz2_QuickLaunchMenu“);
//attach to the load/onload event the method
//to add the handler to add the animations when
//menu section is clicked.
if (window.addEventListener)
{window.addEventListener(“load”, AttachMenuAnimation, false);}
else if (window.attachEvent)
{window.attachEvent( “onload”, AttachMenuAnimation );}
function AttachMenuAnimation()
{
if (_Menus != null) {
for ( i=0; i < _Menus.length; i++)
{
InitMenuAnimations(_Menus[i]);
}
}
}
//this function will attach events to all the TR elements that
//have IDs
function InitMenuAnimations(cntrl)
{
//get all of the TR elements in the table, TBODY is the first element
//so get all of the TR elements from the TBODY element
var allTr = document.getElementById(cntrl).childNodes[0].childNodes;
//loop through all of the TR objects and if it has an ID
//it is a section header so attach an event to hide or unhide
//its content, Attach the event in a non destructive manner
for(i=0;i < allTr.length;i++)
{
if (allTr[i].id != “”){
allTr[i].MyClick = HideUnhide;
//add the handler
XBrowserAddHandler(allTr[i],”click”,”MyClick”);
}
}
}
function XBrowserAddHandler(target,eventName,handlerName) {
if ( target.addEventListener ) {
target.addEventListener(eventName, function(e){target[handlerName](e);}, false);
} else if ( target.attachEvent ) {
target.attachEvent(“on” + eventName, function(e){target[handlerName](e);});
} else {
var originalHandler = target["on" + eventName];
if ( originalHandler ) {
target["on" + eventName] = function(e){originalHandler(e);target[handlerName](e);};
} else {
target["on" + eventName] = target[handlerName];
}
}
}
function HideUnhide(e)
{
var el = this.nextSibling;
if (el.id == “”){
if (el.style.display == “none”)
el.style.display = “block”;
else
el.style.display = “none”;
}
}
“zz2_QuickLaunchMenu” is the client id of QuickLaunchMenu. If you create a webpart you need to replace zz2_QuickLaunchMenu with _Menus.push(“”);
Posted in Sharepoint | Tagged: QucikLauch | 2 Comments »
Posted by ken zheng on October 20, 2008
A few people have posted on the SharePoint newsgroups about writing inline c# code in SharePoint 2007 masterpages. I’m certainly not saying this is a best practise, and there are many different ways to skin a cat, but if you do want to add inline c# into default.master or any other masterpage (or content layout page), these are the basic steps.
Open up SharePoint Designer and the masterpage you want to edit. Switch to the code view and anywhere from the first tag down you can add some inline c# code:
string myVar = “hello world!”;
void Page_Load(object sender, System.EventArgs e)
{
Response.Write(myVar);
SPSite siteCollection = new SPSite(“http://usb-server1″);
SPWeb site = siteCollection.OpenWeb(“/SiteDirectory/MainCalendar/”);
SPList list = site.Lists["Announcements"];
SPListItemCollection items = list.Items;
foreach(SPListItem item in items)
{
Response.Write(item["Title"].ToString());
Response.Write(“
“);
}
}
Doesn’t do anything amazing but does show you can use the SharePoint object model in your inline code. If you saved the masterpage now and opened the site in your browser you’d get an error about not being able to run code blocks. There’s an extra line you need to put into your web.config file first to allow this inline c# to execute.
The PageParserPaths xml tags will be there already you just need to add the line in between. Save web.config and off you go. Your pages will render properly and the c# inline code will execute.
Posted in Sharepoint | Tagged: c# inline, default.master | Leave a Comment »