SharePoint Sharpener

Obsessively Sharpening SharePoint

Posts Tagged ‘sharepoint 2010

Quick Fix: Remove Libraries, Lists From ToC

with 8 comments

 

I usually strive to first and foremost use SharePoint’s out of the box functionality to fulfil clients’ needs. Custom solutions with managed code, controlled deployment etc. are all well and good but sometimes you can get by with some simple frontend-configuration. This approach, if done right, enables clients to easier maintain and further enhance their SharePoint site once it’s up and running and the expensive SharePoint consultants have left the building.

Small adjustments can often be done with CSS or JavaScript/jQuery without remote desktop access to the server park. I know some hard core devs out there will oppose to making more or less unmanaged changes using something that hasn’t been pushed through a compiler. But like it or not, we need to get used to working within the constraints of Office 365 and SharePoint in the cloud. More about that in a later article.

Anyway, let’s skip the politics and get to the point of this post.

 

The problem

When you insert a standard Table of Contents web part it looks something like this:

image

And if you’re like most of my clients, you want it to look like this:

image

I.e. more “site mappy” without links to lists, document libraries and discussions.

 

The solution

This is the quick fix and therefore we’ll use client-side JavaScript to hide the unwanted nodes in the ToC.

First, create a library in the site to hold custom scripts. Why not call it “scripts”?

image

 

For easy editing, open the the new library in explorer view and create a text file, like so:

image

 

Open the text file in your favourite editor and paste the following JavaScript:

   1: <script language="JavaScript" type="text/javascript">

   2: // This script removes lists, libraries and discussions from Table of Contents

   3: // PeopleNet, tso@peoplenet.dk

   4: var links = document.body.getElementsByTagName("a");

   5: for(ii=0; ii<links.length; ii++)

   6: {

   7:     if(links[ii].outerHTML.indexOf("BaseType") != -1 && 

   8:       links[ii].parentNode.parentNode.parentNode.parentNode.className == "level-section")

   9:     {

  10:         links[ii].parentNode.parentNode.parentNode.parentNode.style.display = "none";

  11:     }

  12: }

  13: </script>

 

Save the file and go back to the SharePoint page where you placed the ToC web part. Below the ToC insert a Content Editor Web Part.

Back in the old days (i.e. SharePoint 2007) you’d edit JavaScript directly in the web part. This is still possible but it’s really quirky to work with. Instead, in the web part’s properties, point to the text file you created earlier:

image

 

This approach makes it so much easier to edit the JavaScript in a proper editor instead of in a SharePoint pop-up.

Click OK and save the page. The unwanted nodes are now hidden.

 

Note

I’m fully aware of the implications of the above approach with regards to solution management, client-side performance and so on, but every solution needs to be seen in the context of the need it fulfils. And sometimes the above approach hits the mark.

And remember, the Table of Contents web part is just one of site navigation options in SharePoint.

Advertisements

Written by Thomas Sondergaard

September 27, 2011 at 10:44 pm

Welcome Back! And See You in Anaheim For SPC11

leave a comment »

So, I’m taking the first baby steps towards breathing life back into my severely neglected blog. It would simply be too embarrassing to go to Anaheim in a week’s time without a least a few fresh posts under my belt.

It’s not like I don’t have plenty of useful SharePoint stuff to write about; my beloved OneNote is crammed with years of scribbling about bug-fixing, coding, server trouble-shooting and mostly – let’s face it – more or less elegant solutions to overcome SharePoint’s little quirks.

 

Let’s meet in Anaheim

Once again, PeopleNet will probably be the largest Danish contingent at the SharePoint Conference. Almost 40 of us are going this year, including some of our valued clients.

I’m looking forward to spending some time with like-minded SharePoint enthusiasts during the course of the week, either between sessions or at some of the many social events. SharePints anyone?

 

Live blogging?

Yes, I’m planning to do a few posts before SPC11 but whatever I write during the conference will surely be more interesting for you to read, especially if you can’t attend yourself.

If wifi coverage is acceptable I’ll attempt to live blog during the keynote. At SPC09, literally the second Steve Ballmer walked off the stage after the keynote, I posted an article and it was probably the first semi-comprehensive rundown of SharePoint 2010’s new features to hit the internet. It got a lot of traffic.

This time a new version of SharePoint will not be released but I’m confident a few juicy announcements will be made during the keynote, so tune into my blog for coverage.

I’m probably getting over-ambitious here but I’m toying with the idea of posting some video clips from the conference as well. Not promising anything, though.

 

Meanwhile, follow me on Twitter (@sondergaard) – and have a safe flight to Anaheim, if you’re going…

Written by Thomas Sondergaard

September 24, 2011 at 12:16 am

Official Launch Date for SharePoint 2010 and Office 2010

leave a comment »

It’s official, the release date for SharePoint 2010 and Office 2010 has been announced:

12 May 2010

In addition, the two products will RTM in April.

Arpan Shah, director of SharePoint at Microsoft, made the above announcement on the official SharePoint blog on Friday.

Written by Thomas Sondergaard

March 8, 2010 at 8:44 am

SPC09: Overview of New Developer Features in SharePoint 2010

with 4 comments

 

At the SharePoint Conference in Las Vegas, Paul Andrew gave a thorough overview of the new features for developers in SharePoint 2010.

This is my modest attempt to convey Paul’s presentation in a simple blog post. Please note that the session contained a huge amount of information and I probably (definitely!) didn’t manage to take it all in. Read on at your own risk…

 

Development environment and tools

Traditionally, the path to your first SharePoint hello world-web part is littered with technical obstacles in the shape of tedious installation problems, Windows Server 2003 blues, virtual server nightmares etc. No more. Now you just need your laptop to develop SharePoint applications.

The box

SharePoint developers no longer need to run a Windows 2003 Server. In fact, SharePoint and the development tools can now be installed directly on Windows 7 or Vista (service pack 1). Either versions of SharePoint can be used, i.e. SharePoint Foundation (formerly WSS) or SharePoint Server.

The operating system must be 64 bit since SharePoint 2010 only runs in a 64 bit environment.

SharePoint on a desktop operating system is just for developers and not for running a production environment.

 

Visual Studio 2010

Many of SharePoint 2010’s new features can be accessed from inside Visual Studio 2010. Also, quite a few third-party add-ons may not be needed anymore as the functionality is now covered by Visual Studio.

Highlights:

  • Built-in designers for:
    • Web parts
    • BCS (formerly BDC)
    • Workflows
  • Package and deploy SharePoint projects
  • Generate WSPs
  • View SharePoint sites in server explorer
  • Integration to Team Foundation Server
  • Support for SharePoint sandboxed solutions
  • WSPs from SharePoint Designer can be imported (including workflows)
  • Build workflow steps for SharePoint Designer
  • SharePoint Business Connectivity Services support
  • New events projects templates

 

General improvents

Developer dashboard

A developer dashboard can be displayed automatically at the bottom of every page. The DD displays valuable information about how the page is generated, for instance:

  • Timing and duration of events
  • Database queries (even the ones SharePoint does in the background)

The DD is activated with the follow stsadm command:

stsadm –o setproperty –pn developer-dashboard –pv ondemand

 

Coding

Coding for SharePoint just got slightly easier due to the many improvements in .NET framework 4.0 and SharePoint 2010.

Below is a rundown of some of the new features:

  • LINQ for SharePoint
  • After-synchronous events
  • New event types:
    • Site-scoped events
    • Web creation events
  • Workflow improvements:
    • Initiation and association forms in Visual Studio
    • New design user interface for workflows in SharePoint Designer
    • Use Visio 2010 to design workflows
  • SharePoint UI can now be saved as a template
  • WSP is now the unified developer format – works in site collections and machine

 

Improvements to lists

In SharePoint 2007, lists can cause any developer headaches. Hopefully, the new list architecture in SharePoint 2010 will solve this. Below is an overview of some of the improvements:

  • Validation with Excel-like Formula – forms can be validated using simple syntax
  • Lookup to multiple columns
  • Lookup fields have true relations which ensure proper deletion (transaction-style)
  • List index auto-creation
  • Scalability and performance vastly improved:
    • Lists and folders can now contain a million elements
    • Document libraries can contain 10 million documents
  • List query throttling
  • Lists views no longer based on CAML but XSL-T. Queries still use CAML

 

Ribbon and Dialog framework

The ribbon we know (and some love) from Microsoft Office is now used in SharePoint 2010.

Some of the highlights:

  • Custom actions can be embedded in the ribbon
  • The ribbon is context sensitive
  • The SharePoint out-of-the-box forms are replaceable
  • New web dialog functionality:
    • A dialog floats on top of the SharePoint page and is used to get input from the user
    • Fully programmable

 

Silverlight 3

Silverlight plays an important part in SharePoint 2010 and is used in many of the improved UI elements. From a developer’s point of view, these are the highlights:

  • Built-it and customisable media player web part
  • List and site creation from within Silverlight
  • Office web applications run in Silverlight
  • Client object model – call SharePoint APIs from within Silverlight

Written by Thomas Sondergaard

October 19, 2009 at 9:48 pm

SPC09: SharePoint 2010 Unveiled – Rundown of New Features

with 5 comments

This is it – the long awaited SharePoint 2010 has been unveiled, not released, by Microsoft CEO Steve Ballmer. The public beta will be available next month.

SharePoint 2010 is a huge update of the platform and most attendees at the keynote were blown away by the dramatic improvements across the board in SharePoint.

Jeff Teper (MS Corporate VP), Jared Spataro (MS Director, SharePoint) and Arpan Shah (Director, SharePoint Technical Management) showed off many of the new features in SharePoint 2010 – see my notes below.

New features in 2010

User interface

  • Ribbon-based contextual menus, much like in Office 2007
  • Live preview of font changes etc.
  • Broad use of AJAX to minimise number of page refreshes
  • More seamless integration of web-based and desktop clients
  • All Office documents can now be viewed and edited in a rich web version of the desktop client

Accessibility

  • Cross-browser compatibility
  • XHTML and WCAG compatible output

Collaboration

  • Completely revamped wiki
    • Improved editing tool
    • Dramatically improved image upload and handling
  • Richer blogs
  • Improvements to the calendar lists
  • Web-based, OneNote-like functionality

Organisation

  • Tagging, social tagging
  • Rating of documents
  • Bookmarks

MySite and Social Computing

  • Smart profiles
  • Activity feed – overview of a user’s recent activity
  • Browse colleagues
  • Locate experts within the organisation
  • Tag cloud of a person’s recent activities
  • Note board – i.e. a tagwall

Content Management

  • Improved scalability – lists and folders can now contain a million elements. Document libraries can contain 10 million documents
  • Digital Asset Management
  • Consistent content type across all servers in a farm
  • Streaming of video placed in document libraries
  • Improved governance possibilities

Search

  • Choice between standard SharePoint search and FAST Search
  • Wild card searching – used of asterisks
  • Improved people search – rich info on the search results page
  • Live preview of documents, slides etc right on the search results page

Business intelligence

  • Excel Services – including SQL Server PowerPivot
  • PerformancePoint Services – advanced BI dashboards
  • Visio Services and Chart web part
  • Business Connectivity Services – the new name for Business Data Catalog (BDC)

SharePoint Workspace (the new name for Groove)

  • Improved offline content
  • Improved mobile access to content

IT infrastructure

  • 64-bit only!
  • SharePoint Foundation is the new name for WSS
  • Online/cloud version of SharePoint is a focus point for Microsoft
  • PowerShell Admin
    • Fully scriptable admin of SharePoint
    • Around 500 PowerShell commandlets will be shipped with 2010
    • Admin SharePoint from PowerShell running on Windows 7
    • Whatif command to preview impact of commands
  • New Central Administration
    • Problems and solutions page with overview of current problems on the farm, and possible solutions
  • Throttling
    • Control how many resources specific lists, sites etc. may use
  • Monitoring, Analytics
    • Usage analysis database will be customisable
  • Improved Upgrade and Availability
    • Visual Upgrade enables individual users to choose when to upgrade a site

SPC09: Arrival in Las Vegas

leave a comment »

Last night I arrived in Las Vegas for the annual Microsoft SharePoint Conference – along with 13 colleagues from PeopleNet and a handful of clients from Denmark.

Some of us are staying at Mandalay Bay and some (including me) at the Luxor.

View from Luxor Hotel, Las Vegas

Today is the official Microsoft welcome reception and, more importantly, the first SharePint of the conference.

Tomorrow the NDA of SharePoint 2010 is lifted and the sessions can begin. I’ve signed up for many more sessions than I can possibly attend and I also intend to spend time at the partner floor and network/socialise with SharePoint contacts from around the world.

I’ll blog as much as I can and you can also follow me on Twitter.

It’s going to be a busy week…

Written by Thomas Sondergaard

October 18, 2009 at 5:12 pm