Saturday, April 21, 2012

SharePoint 2010 Global Navigation with the Managed Metadata Service

Recently while working with a client, a requirement for global navigation in their new SharePoint 2010 farm came up.  They have approximately 10 web applications with a minimum of 10 site collections per web application, so manually maintaining the navigation at each site collection was out of the question.  I therefore started to look at the usual suspects for global nav.  I went over the SiteMapDataSource, SharePoint 2010 Navigation Menu, and multiple other custom solutions with them.  Each one had its benefits and drawbacks but we had just about settled on a robust custom solution when an idea came to me while watching a St. Louis Cardinals baseball game (not important to the solution).  What about the Managed Metadata Service?  We were only going to have one service for the whole farm and pretty much as long as the farm is up, so is the service (i.e. not dependent on another web application).  So I started looking…

There is a label that could be used as the display name, a large text box for description that could be used for the URL and built in custom sorting and if needed could support multiple languages in the future.  Once I determined that, it was just a matter of some custom code and POC testing.

I started by setting up a Group, Term Set and the nested Terms that would make up my navigation.  Assigning each Term a “Default Label”, populating the “Description” if I want it to be a link or leaving it blank if it was just a container and unchecking “Available for Tagging” for Terms but keeping it checked for the Term Set (more on that later):

Wednesday, November 9, 2011

Office 365 Public Site - How to insert JQuery or other HTML directly into the page


I know I promised this post a long time ago but thankfully I have been very busy.



On the surface the HTML web part available on the public facing website appears to be a Swiss army knife for the site. If you can insert any HTML into the page then you can do just about anything. But… on closer examination you find that the HTML you insert into the part is placed in an Iframe and all script and content is loaded with the setTimeout JavaScript function. Currently it does appear that the base theme CSS is inserted into the Iframe but any custom CSS is not being applied. This is easily worked around if you either copy and paste your same CSS or use the same import statement I discussed in my previous post.

The reason I started looking at the HTML part was to insert JQuery and my own script into the page. Being asynchronously loaded into an Iframe meant no real help when it came to modifying elements on my page. So I started searching elsewhere. I then stumbled on the Site Options on the Site ribbon in SPD.

Tuesday, July 19, 2011

Federation with Lync on Office 365 and Your Customers

We have just setup federation with 2 of our clients and it could not have been any easier.  We allowed the external communication and simply had the clients add: “sipfed.online.lync.com” for bajaconsulting.com to their trusted domains.  (see http://lyncdup.com/2011/04/how-to-enable-office365-lync-online-to-federate-with-lync-on-prem/ for a great walk through).

Sunday, April 17, 2011

Office 365 Here I Come

Well in my last post I promised to write more about the changes I have made to www.bajaconsulting.com but before I could I got accepted into the Office 365 Beta program (http://www.microsoft.com/en-us/office365/online-software.aspx) which of course includes a small business public web site based on SharePoint 2010.  I could not have been happier and jump right in to make the same changes I had just made to my new static site on the SharePoint site plus add some cool new stuff that only SharePoint 2010 could supply.



The first thing I did was start changing the page layout (through the GUI) to look the way I wanted it.  I put the menu at the top of the page and added my copyright information to the bottom. 



I then started looking at customizing the CSS… very easy also:



Saturday, April 9, 2011

Updating BajaConsulting.com

I have been updating www.bajaconsulting.com to include HTML5 and a lot of JQuery / Ajax.  Stay tuned and I will post more.

Sunday, May 16, 2010

Why write custom web parts or XSLT when you have JQuery?

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.

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 the that 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.