Tag Archives: Search

Birthdays and Anniversaries

After much procrastinating and work, I finally revisited the Birthdays widget I introduced in JavaScript Templating with SharePoint 2013 (Part 3) about a year ago. The template was well received and liked by many. My initial post was prototype code with a handful of bugs. I’ve since worked fixed those bugs and converted the template to a web part. A web part? Yes..a web part. I know…I know. I should have used a SharePoint hosted app but a web part was too easy to resist! Maybe vNext???

Several people also asked if the original template could be extended to support anniversaries. I’m happy to announce that I finally found time to do that as well!

The Finished Product


Continue reading

Office Web Apps ‘You don’t have access to this page’

Recently I had a request to show display a document in an iframe using Office Web Apps in SharePoint 2013. Pretty straightforward. In fact, Office Web Apps makes this easy. If you click the File tab in the ribbon > Share > and Embed the iframe html is right there for you.The iframe src attribute will look something like ‘http://yoursite/_layouts/15/WopiFrame.aspx?sourcedoc=blahblah&action=embedview.’ Sweet!

The Problem

I used the code as is and thing worked great…I thought. Randomly I would get a message stating “Sorry, you don’t have access to this page.”

Continue reading

JavaScript Templating with SharePoint 2013 (Part 3)

Update: I’ve since converted this template to a configurable web part. See http://www.lestersconyers.com/birthdays-and-anniversaries/ for latest.

Welcome to Part 3 of JavaScript Templating. In this post we will use the SharePoint 2013 Search API to build a Birthdays web part based on user profile data. And my procrastination worked for the good because today is actually my birthday! As in the last post I will be using jQuery to retrieve data and Handlebars to build my HTML.

The Finished Product

I’ll be building a template the renders upcoming birthdays. The display is based on Facebook’s birthday reminders. And as an added bonus, we’ll allow you to post a “Happy Birthday” message to the birthday boy’s (or girl’s) news feed.
birthdays list

Continue reading

Refiners on OSSSearchResults.aspx page

In SharePoint 2010 you can customize the refinement panel on the results page of a search center. Unfortunately the default search scope “This Site” uses the OSSSearchResults.aspx page. This is a layouts page so you cannot edit the refiners or add new refiners. So if you wanted cool and custom refiners added, you had to force users to use the search center. Once you force them to use the search center they lose the “This Site” scope if they attempt to search from the center. A big mess.

This solution allows you to have your custom refiners and the osssearchresults page.

Continue reading

Extending Search Web Parts

Here is code sample showing how to extend the search core results web part in SharePoint 2013. This can also be used for the content by search web part because it inherits from the search core results web part. In this sample I modify the query programmatically to retrieve items with metadata that matches a claim for the current user. This would be really helpful if you want to target content for a customer based on their demographics or browsing history. You know…like the Disneyland ads that appear in GMail a day after you research a Disneyland vacation :) .
Continue reading