Wednesday, October 26, 2011

Strange ampersand from SharePoint 2010

Been noticing on term stores that if you enter an ampersand, SharePoint replaces the "&" with "&". I couldn't see anything different about it when inspecting the HTML or looking at it on Notepad++ with the "show all characters" turned on. So I'm assuming it has to do with different encoding.

It's not recognized as a regular ampersand by Server.HtmlEncode() nor by String.IndexOf().  Ended up doing a specific String.Replace("&","&") on it so the other functions could work with it.

Difficult to Google for "&", but did find some reference to ampersands on SharePoint 2010: Are Ampersands Stored Differently in SharePoint 2010 Than SharePoint 2007?

Friday, October 21, 2011

HTML5 Showcase

HTML5 Showcase:  "a gallery of the best html5 sites in the world"

CSS3.Info

CSS3.Info: "everything you need to know about CSS3"

Hide a row containing empty cells

Using jQuery, based on this StackOverflow thread:


$("tr").each( function() 
  if ($(this).children("td:not(:empty)").length > 0) { 
    $(this).show(); 
  } else { 
    $(this).hide(); 
  } 
});

Monday, October 3, 2011

Find all references to a page layout or master page

From Andrew Connell's blog:
  1. Go to the Site Content and Structure page.
  2. Open up the Master Page Gallery.
  3. Select one of the page layouts in the gallery.
  4. Click on "Show Related Resources" on the toolbar.

SPQuery subfolders

SPQuery.ViewAttributes on MSDN:
... if the Scope attribute is set to Recursive (Scope="Recursive"), the query displays all the files within a document library, including ones in subfolders. If it is set to anything else, the query displays only files in the top folder.