As I have started migrating my old web sites over to SharePoint 2010 I have been evaluating customizations that I made for my MOSS 2007 sites. On many occasions I had used the dataview web part to do thing like opening external links in new windows and hiding headers that are not needed. In comes JQuery and the content viewer web part.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//Hide the header row
$(".ms-listviewtable tbody tr:nth-child(1)").hide();
//Open links in new window
$(".ms-listviewtable tbody a").click(function(){
this.target = "_blank";
});
});
</script>
This was pretty easy because all the list view web parts on the page contains all external links but this could be pretty easily to check the links before opening them in an external window.
Sunday, May 16, 2010
Thursday, May 13, 2010
One way to migrate a list from SharePoint 2007 to SharePoint 2010
I just started messing around with list template migration from V3 to 2010 and found it to be way too easy but very cool.
The first thing I did was save a list as a template in V3 and download to my laptop.
I then renamed the file from *.stp to *.cab and extracted the file Manifest.xml
The first change to make to manifest is to change
<productversion>3</productversion> to
<productversion>4</productversion>
Simple enough.
The next change I made was for any lookup fields I had. Do a search in the file for your lookup fields. You will see an attribute on thethat looks like List=”{GUID}”. All you have to do is change the attribute to List="Lists/<List name>" where < List name> is the name of the lookup list. And that is it.
Create a new CAB file, add your manifest and rename the file to *.stp again.
Upload the template to the SharePoint 2010 templates gallery.
Make sure that all source lookup lists have been created and then create your new list from the template.
When I did this I even had it keep the data in the template and everything matched up perfectly.
The first thing I did was save a list as a template in V3 and download to my laptop.
I then renamed the file from *.stp to *.cab and extracted the file Manifest.xml
The first change to make to manifest is to change
<productversion>3</productversion> to
<productversion>4</productversion>
Simple enough.
The next change I made was for any lookup fields I had. Do a search in the file for your lookup fields. You will see an attribute on the
Create a new CAB file, add your manifest and rename the file to *.stp again.
Upload the template to the SharePoint 2010 templates gallery.
Make sure that all source lookup lists have been created and then create your new list from the template.
When I did this I even had it keep the data in the template and everything matched up perfectly.
Wednesday, May 12, 2010
SharePoint 2010 install on Windows 7
I just got SharePoint 2010 Server installed and had a few lessons learned.
First, I followed the directions at:
http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx
Everything installed perfectly but when Central Administration came up the page was blank. So... I uninstalled and reinstalled SharePoint (4 times) and then went to bed. After a good nights sleep I realized it had to be an IIS issue.
I completely removed IIS from the box and just followed the directions from the above link and magically it all worked perfectly. It may have been that I was also running WSS 3.0 on the same OS or maybe IIS just got corrupted but now it works.
First, I followed the directions at:
http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx
Everything installed perfectly but when Central Administration came up the page was blank. So... I uninstalled and reinstalled SharePoint (4 times) and then went to bed. After a good nights sleep I realized it had to be an IIS issue.
I completely removed IIS from the box and just followed the directions from the above link and magically it all worked perfectly. It may have been that I was also running WSS 3.0 on the same OS or maybe IIS just got corrupted but now it works.
Subscribe to:
Comments (Atom)