How to change Page Layout of existing page in SharePoint?
Recently a task was assigned to me to make sure that dev site should look like production one. First thing i noticed when i comparing two sites is both pages using different page layouts. so the question is how do you change the page layout which associated with your current page?
It is really simple once you know where to look.
- Go to the Page which you want to change. In my case i need to change my home page. so i browse http://mysite/home.aspx
- Click Site Actions and then select Edit Page option.
- On the toolbar, Click on Page and then select Page Settings
- Now you can pick your page layout
- Click OK once you done with your changes
SharePoint List Template Id’s
Following table shows the default list template and its Id’s.
100 Generic list
101 Document library
102 Survey
103 Links list
104 Announcements list
105 Contacts list
106 Events list
107 Tasks list
108 Discussion board
109 Picture library
110 Data sources
111 Site template gallery
112 User Information list
113 Web Part gallery
114 List template gallery
115 XML Form library
116 Master pages gallery
117 No-Code Workflows
118 Custom Workflow Process
119 Wiki Page library
120 Custom grid for a list
130 Data Connection library
140 Workflow History
150 Gantt Tasks list
200 Meeting Series list
201 Meeting Agenda list
202 Meeting Attendees list
204 Meeting Decisions list
207 Meeting Objectives list
210 Meeting text box
211 Meeting Things To Bring list
212 Meeting Workspace Pages list
300 Portal Sites list
301 Blog Posts list
302 Blog Comments list
303 Blog Categories list
1100 Issue tracking
1200 Administrator tasks list
2002 Personal document library
2003 Private document library
How to find the template name of SharePoint site?
When you look into any SharePoint site which was created by someone, first question you get is, Which template they used to create the site? It is very difficult to tell by looking at the site.
I used following approaches to find template names/ids
Approach 1: Save the site as a template
- Go to Site template Gallery and download the save the template to your desktop
- Rename the template extension from .stp to .cab.
- Extract .cab file contents. (I normally use WINRAR)
- open the manifest.xml file.
- Search for TemplateID and Configuration.
ID 0 = Global, Configuration 0 = Global Template
ID 1 = STS or SharePoint Team Site, Config 0 = Team Site
ID 1, Config 1 = Blank Site
ID 1, Config 2 = Document Workspace
ID 2 = MPS, or Meeting Place Sites, Config 0 = Basic Meeting Workspace
ID 2, Config 1 = Blank Meeting Workspace
ID 2, Config 2 = Decision Meeting Workspace
ID 2, Config 3 = Social Meeting Workspace
ID 2, Config 4 = Multipage Meeting Workspace
ID 3 = Centraladmin, config 0 - Central Admin Site
ID 4 = WIKI, Config 0 = Wiki site
ID 5, Config 0 = Blog
Any ID over 10000 is custom.
If ID is 75800 range, it might be additional Microsoft applications and templates. You can Check here.
Approach 2: Using custom ASPX page
http://blog.rafelo.com/2008/05/determining-site-template-used-on.html
Redirect a SharePoint Site/Page to another Site/Page using Content Editor Web Part
Redirecting the user from one site/page to another site/page is most common scenario.
You might have several reasons for this like Site Move from one location to another or Point Staging to Production etc..,
For whatever reason, you can achieve this functionality easily using Content Editor WebPart.
Copy and paste the following code into your Custom Editor WebPart
<script language=”JavaScript”>
alert(“The site has been moved to a new location and will automatically redirect to the location. Please update your bookmarks accordingly."”);
</script>
<meta http-equiv=”refresh” content=”0;url=http://[YOUR NEW LOCATION]”>
Once you save these changes, you are not able to modify any thing on this page since it is redirect to new location.
If in case you want to remove this webpart, the workaround is, you have to go through webpart maintenance page.
Copy the following code in Browser Address and make changes accordingly
http://[SERVERNAME]/_layouts/spcontnt.aspx?pageview=shared&url=[Your WebPart Page URL] (For Example: /FirmCalendar/pages/default.aspx)
Select the checkbox which you want to close, and click close button
To enable the closed WebParts follow these steps
1. Go To Site Actions –> Edit Page
2. Click on any Add WebParts
3. Click on “Advanced WebPart Gallery and Options”
4. Click on Closed Web Parts link
5. Drag and drop the Content Editor WebPart Where ever you want.
Hope this helps some one.
No more SSPs in SharePoint 2010
Yes there are no more Shared Service Providers (SSPs) in SharePoint 2010. This is One of the most interesting and powerful thing in SharePoint 2010. For users who are not familiar with SSPs in SharePoint 2007, you can read my previous post here.
What’s wrong with SSPs?
SSPs were vary handy in SharePoint 2007. They allowed us to share different services like profiles, audiences, search, Excel Services and BDC with different web applications. The problem is if we want to use same search service across multiple web applications but we want to have a totally different profile or BDC configuration. To achieve this functionality, the only option we have is to create a new SSP and duplicate the search service configuration/settings. In feature if we want to make any changes to search service, we have to do it in two places and It’s a hassle.
Some of the major problems with SSPs,
- SSPs are not built on Core services (WSS) and it built on SharePoint Server.
- SSPs are non extensible other than Microsoft SharePoint Team.
- SSPs are tied to a single farm. Technically Shared-farm SSPs are possible, but it tricky.
What’s the new approach?
In SharePoint 2010 Shared Service Provides(SSPs) are replaced by Service Applications. So what ever services existed in SSPs are still exist but have been unboxed and don’t have dependencies to each other. In the new version, there are over 20 service applications built using the service application framework. All of these service applications can run independently and each service has its own database (that’s why you see many databases in SQL Server compare to SharePoint 2007). If we want, we can also built our own service application (its is a very advance topic you can find a nice video here), it’s that much flexible.
Since each service run independently,the new service application framework removes the restriction, which says, “a web application could only be associated with a single SSP”. Now web applications can consume services on a individual basis and can use any combination of the available service applications.
If one of the service has high demand, we can easily scaled out across farms.
Summary
- Web application can be configured to only use a subset of deployed services.
- You can deploy multiple instances of the same service in a farm by giving the new service instances unique names.
- You can also share services across multiple web application.
IE6 Tooltip for Select element workaround
In my project, we have a requirement to show huge list of data in a select element. Some of these data has long names to show but the restriction what we have is, Select element has to be in a fixed width to fit it in our UI. So to accomplish the requirement we have the following options
Option 1: Show Horizontal and vertical scroll bars so that user scrolls to see the full name.
Option 2: Show full name in a tooltip on mouse over.
Option 1 is not a good choice to me since it has scroll bars which spoils UI look and feel. Even though i tried this option and later i found that Select element won’t have any horizontal scroll bar by default in IE6 (Bug). Later i found that they have workaround to achieve this functionality.
I googled lot for option 2 and found couple of solutions, but it worked partially. so i made the couple of changes to fit my needs. Following is the code i used for IE6 tooltip.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>IE6 Hack to enable tooltips on select elements</title>
<script>
function showIE6Tooltip(obj, e)
{
if (!e)
{
e = window.event;
}
var eX = e.offsetX ? e.offsetX : e.layerX;
var eY = e.offsetY ? e.offsetY : e.layerY;
var maxOptionCount = obj.options.length;
var listItemHeight = (obj.clientHeight / obj.size);
var itemsAtTheTop = Math.floor(obj.scrollTop / listItemHeight);
var hoverOptionIndex = Math.floor(eY / listItemHeight);
//the index of mouseover
var toolTipIndex = Math.floor(hoverOptionIndex + itemsAtTheTop);
if(hoverOptionIndex >= 0 && hoverOptionIndex < obj.size )
{
var tooltip = document.getElementById('ie6SelectTooltip');
tooltip.innerHTML = obj.options[toolTipIndex].text;
mouseX=e.pageX?e.pageX:e.clientX;
mouseY=e.pageY?e.pageY:e.clientY;
tooltip.style.left=mouseX+10;
tooltip.style.top=mouseY;
tooltip.style.display = 'block';
var frm = document.getElementById('frm');
frm.style.left = tooltip.style.left;
frm.style.top = tooltip.style.top;
frm.style.height = tooltip.offsetHeight;
frm.style.width = tooltip.offsetWidth;
frm.style.display = 'block';
}
else
{
hideIE6Tooltip(e);
}
}
function hideIE6Tooltip(e)
{
var tooltip = document.getElementById('ie6SelectTooltip');
var iFrm = document.getElementById('frm');
tooltip.innerHTML = '';
tooltip.style.display = 'none';
iFrm.style.display = 'none';
}
</script>
</head>
<body>
<div style="overflow-x:hidden; overflow-y:scroll; height:200px; width:90px">
<select id="test" title="Title on the select" onmousemove="showIE6Tooltip(this,event);" onmouseout="hideIE6Tooltip();" size="20" >
<option value="1" title="This is the number 1 option, with a really long title based tooltip">1 Thing</option>
<option value="2" title="This is the number 2 option, with a really long title based tooltip">2 Thing</option>
<option value="3" title="This is the number 3 option, with a really long title based tooltip">3 Thing</option>
<option value="4" title="This is the number 4 option, with a really long title based tooltip">4 Thing</option>
<option value="5" title="This is the number 5 option, with a really long title based tooltip">5 Thing</option>
<option value="6" title="This is the number 6 option, with a really long title based tooltip">6 Thing</option>
<option value="7" title="This is the number 7 option, with a really long title based tooltip">7 Thing</option>
<option value="8" title="This is the number 8 option, with a really long title based tooltip">8 Thing</option>
<option value="9" title="This is the number 9 option, with a really long title based tooltip">9 Thing</option>
<option value="10" title="This is the number 10 option, with a really long title based tooltip">10 Thing</option>
<option value="11" title="This is the number 11 option, with a really long title based tooltip">11 Thing</option>
<option value="12" title="This is the number 12 option, with a really long title based tooltip">12 Thing</option>
<option value="13" title="This is the number 13 option, with a really long title based tooltip">13 Thing</option>
<option value="14" title="This is the number 14 option, with a really long title based tooltip">14 Thing</option>
<option value="15" title="This is the number 15 option, with a really long title based tooltip">15 Thing</option>
<option value="16" title="This is the number 16 option, with a really long title based tooltip">16 Thing</option>
<option value="17" title="This is the number 17 option, with a really long title based tooltip">17 Thing</option>
<option value="18" title="This is the number 18 option, with a really long title based tooltip">18 Thing</option>
<option value="19" title="This is the number 19 option, with a really long title based tooltip">19 Thing</option>
<option value="20" title="This is the number 20 option, with a really long title based tooltip">20 Thing</option>
</select>
</div>
<div id="ie6SelectTooltip" style="display: none; position: absolute; padding: 1px; border: 1px solid #333333;
background-color: #fffedf; font-size: smaller; z-index: 999;">
</div>
<iframe id="frm" style="display: none; position: absolute; z-index: 998"></iframe>
</body>
</html>
For me the above code worked vary well. I hope this code is useful for some one. If so, please leave some comments below.
SharePoint 2010 Features and Enhancements
Following is the high-level list of SharePoint 2010 features and enhancements. For detailed information you can check it here.
New in SharePoint 2010
- Language Integrated Query (LINQ)
- AJAX Support
- Ribbon navigation
- List Enhancements
- New Scale Limits
- XSLT Views for better customizations
- Cascade deletes/Updates
- Formula Validation for Column like Excel
- External Data List Type - allows to connect external data such as databases or web services.
- Business Connectivity Services (BCS) - New name for BDC and drastically enhanced.
- Silverlight integration
- Client side object Model
- Sandbox Solutions - deploy in a secure environment.
- Added More Services - Word,Visio, Performance Point and Access Services in addition to Excel and InfoPath Form Services.
- New enhancements to InfoPath Form Services
- Replace default list forms to InfoPath form
- New mobile form capabilities
- Well Integrated with Visual Studio 2010
- Browse SharePoint environment from server explorer to see lists, libraries, Content types, etc.,.
- Web Parts Visual elements
- improved Web Solution Package (WSP)
- Development on Windows 7
- Developer Dashboard
- Communities
- Enhanced Blogging and wikis
- Tagging and Rating
- Activity Feeds - Stay informed and track colleagues updates
- Social Bookmarking - can be internal or external web sites
- Enhanced My Sites
- Enhanced User Profiles
- Organization Browser
- Search
- Extensible Search web parts
- preview content with integrated FAST technologies
- Phonetics people search
- Outlook Address book style lookup
- FAST Search - need separate license
- Content Management
- Document Management
- Metadata views instead of hierarchical folder based navigation
- Location based metadata
- Document Routing to specific location
- unique document IDs instead of URL based location
- Taxonomy services
- Document Sets - Manage collection of different content (doc,ppt,xls) into a set
- Records Management
- Multi stage disposition
- In place records management
- location based file plans
- e-discovery
- Web Content Management
- New Enhanced UI
- XHTML Compliant
- Enhanced Page libraries
- Digital Asset Management
- Support most common digital assets like Video, Audio, Images
- Bit Rate Throttling with IIS - Just in time delivery of the content instead of deliver the entire video to the user at maximum speed.
- Remote BLOB (Binary Large OBject) storage
- Silverlight WebPart and Media Player
- Workflows
- Now Workflows are Customizable
- Allowed Site Workflows
- SharePoint Workspace (Previously known as Groove) - allow to work offline and sync the lists, libraries and forms
- Document Management