SharePoint Branding & Customization Behind the Scenes: MS Secretary of State Website

sos

Launched August 2014, the Mississippi Secretary of State website was designed and developed by Mississippi Interactive. Team members include: Michelle Pakron – Strategy, Design, Web production, SharePoint integration and Customizations, Mobile optimization, and testing; Jesse Kyzar – Advanced Javascript programming and .NET application development.

The SOS website was built in SharePoint 2010 and uses the Bootstrap 2.0 responsive framework. The masterpage was a modified version of the responsive V5 SharePoint Masterpage created by Kyle Shaeffer. I added in code from Randy Drisgill’s starter masterpage and also altered the ribbon code and the accompanying css and javascript files.

The site uses one custom masterpage and multiple custom page layouts. The home page in particular is a custom page layout without any editable areas. Each piece of the home page is either a data view web part pulling content from a list, or is pulling from an external source via the SPServices Javascript library. This was done to make it as easy as possible for the SOS staff to maintain the site as it is much simpler to edit a list item then to code directly into a page.

Home Page Breakdown

sos-2

1: The Featured Services area is an images library pulled into the page via a custom Data View web part.

2: The Slider is dynamically pulling content from another images library and is displayed via SPServices

3: The How Do I area is a Data View web part fed by a custom list

 

sos-3

4: The Featured area is fed from an images library via a Data View web part

sos-4

5: The Press Releases feed box is fed from an external .NET admin application via SPServices; each individual Press Release is fed into a SharePoint page via SPServices as well.

6: The What’s New feed box is a listing of Pages pulled via SPServices from the root Pages library that uses a specific Page Layout called “News”.

7: The Twitter feed box pulls content directly from the MS SOS’s Twitter Feed via Javascript.

Use of Third Party Web Part

sos-5

We purchased the SharePoint Form Web Part in order to create forms based off of lists that work with anonymous access. The Share Your Solutions form was created by first creating a custom list to store the form data. A copy of that list was then created called Archive. I then created a custom workflow that kicks off once the web part adds data to the list that automatically emails the Business Services director the form contents as well as moves the list item from the main list into the archive, which is then secured to authenticated users only. The SharePoint Form web part automatically creates the form fields once attached to a SharePoint list.

If you need simple forms on your public-facing SharePoint site and don’t want to bother a developer, I highly recommend this web part. Just make sure that it is installed and activated on each server before doing a content deploy or backup/restore to a server or it will break your form, even if you activate it after the fact.

View the Site

www.sos.ms.gov

Advertisements

Make a Data View Web Part Work on Sub Sites

One of the things about SP 2010 that has driven me crazy is the inability to get DVWPs from one level of a site to work correctly in another level. Maybe you have a list on a subsite and want to surface that content on the homepage, or the list is at the root and you want to use the DVWP on a sub site. I even went as far as having my company pay for Laura Roger’s time a year or so ago to have a web meeting with her to see if there was a solution. What I was told was that there were a few things you can try but there was no guarantee any of it would work, depending on your specific farm setup, etc. I found some instructions on the web with hacks but they never went deep enough and I could never get them to work.

Last night, as I was thinking about another dvwp issue-how to create a dvwp that displays an item randomly-I found a site that had a solution for that issue as well as one for the other issue. The problem was that the instructions still were not clear enough, there were steps that maybe were assumed but that I didn’t know about or understand. So I had to poke it a while but I finally got both issues-the random item dvwp and the make dvwp work anywhere in the site- to work.

I take no credit for these solutions, I only translated them into a more visual language for folks like myself.

>> Instructions for making a data view web part work on subsites

>> Instructions for creating a data view web part that displays a random item

>> Source for these solutions

Sharepoint Branding & Customization Behind the Scenes: Responsive, SharePoint, the new ms.gov, 2013 Version

Maybe I can get some sleep now… I swear, I have never worked so hard on a project in my life, and I know I will have more tweaking to do before it’s all said and done… We all worked really hard on this and we are very excited to create this site for the state of Mississippi and its citizens!!! SharePoint isn’t perfect yet, there are many things I would add to make SharePoint better suited for internet-facing sites, but I hope this site, along with the others I have posted from our sibling portals, can show you what is possible right now with SharePoint 2010. Maybe for the next refresh we will be in 2013, we’ll see 🙂

The goal for this redesign was to be user-oriented and to provide the citizens of Mississippi the content that they routinely search and ask for. We based these decisions off of Google Analytics, customer service feedback, and webmaster feedback. We tried to provide the most used links in a compact design while still providing an attractive interface. We weren’t trying to create a brochure site or a travel-theme site, this is a state website meant for users to come in, get what they need, and get on with their day. We added new content throughout the site, such as the Governor’s Initiatives  and the Mississippi Maps pages. We also rebuilt our Agency Directory, which is the most used feature of the entire site, in .net so that it was easier to update, faster, and with more agency content.

ms.gov

devices_multi

Highlights:

  • SharePoint 2010 site (Home page is NOT in SharePoint, nor is the Feedback page or the Agency Directory-they are .net)
  • Responsive, html 5 site
  • Sliders are swipable on iPad, iPhone, Kindle Fire
  • Uses Google Fonts, Google and Bing mapping technologies, JQuery and SP Services, a hybrid V5 and Randy Drisgil masterpage, and Twitter Bootstrap

Dev Team:

  • Creative Director, SharePoint Branding & Customizations, Data View Web parts, CSS: Michelle Pakron
  • .Net and Javascript Programming: Jesse Kyzar
  • Databases, mobile ms.gov iPhone app development: Spencer Jones

 

Inspiration: New State Websites Made With SharePoint

It’s been a long while since my last post… I have been working non-stop, particularly on the new ms.gov, which is going live tomorrow. I wanted to show everyone some great new state websites, all made by subsidiaries of my parent company, NIC, that all use SharePoint. Hopefully these will provide some inspiration to show what is possible with SharePoint for internet-facing sites.

Texas.gov

tx

The new Texas.gov is responsive, with a  clean, stripped down aesthetic that loads quickly. It uses SharePoint 2010, along with Google fonts, JQuery, Modernizr, and other goodies, proof that modern web development techniques can work beautifully with SharePoint.

SC.gov

sc

The new South Carolina state website is bold and bright. It also uses several modern web technologies such as Google fonts and JQuery UI, and responsive design.

Maryland.gov

ml

The new Maryland.gov is packed with features. It is an HTML 5, responsive site loaded with custom SharePoint developed features-this site is a good example of what you can do if you have dedicated SharePoint engineers.

MS.gov

I can’t show it today or my GM will kill me, but I can tell you it is a SharePoint 2010 HTML 5 site, it is responsive,  uses Twitter Bootstrap, JQuery, SPServices, Google Search and Google fonts, and it is has touch groovies for tablet users. I will post more on it tomorrow 🙂

Internet-Facing Sites with SharePoint 2010: Tips, Tricks, & Gotchas

This post will be a collection of the lessons I have learned over the past 14 months building internet-facing SharePoint sites. I will add to it as I remember things I have learned 😉

 

  • Start with a solid base. I have used two different starter masterpages, one from Randy Drisgill  (used on ms.gov) and one from Kyle Shaeffer   (an altered version was used as the base for Its.ms.gov)
    • I edited both and added customizations to suite my needs. I used Kyle’s for a responsive site, though I took the ribbon code from Randy’s and made some other alterations.
  • If you are going responsive, use a solid framework. I used a modified version of Twitter Bootstrap along with my modified masterpage from Kyle Shaeffer. Kyle includes some SharePoint resets and a script that helps to counter some SharePoint wackiness when going responsive.
  • I design internet-facing SharePoint sites the same way I do any other type of site. I create a mockup and then build it out in Dreamweaver using HTML 5 and CSS3. Of course, having a strong knowledge of SharePoint helps in deciding what element s of my design should be lists, which should be data views, and which should be some groovy JQuery thingy that I need to pull my developer in to build. Once I build out the unique pages (usually home, sub, full width layouts) I then test these in IE 7-9, Chrome, FireFox, and Safari. I make any corrections for IE and then I pull the designs into SharePoint Designer.
  • I have found that no site that works perfectly outside of SharePoint will work perfectly once inside. I usually have at least a few minor CSS issues to correct, generally having to fix any CSS declarations for global tags, like ul’s and img’s. I try to make all of my styles contextual so as to not override the ribbon or editing interfaces.
  • When things don’t work correctly, I find that I usually have misspelled something. I have a habit of spelling Bootstrap as Bootsrap-I wasted an hour trying to figure out why my grid was collapsed until I realized my spelling error.
  • Fun With Anonymous Access
    • Internet-facing means anonymous access. This means that many features of SharePoint are no longer supported without being logged in. For example, I had hacked a list entry form to serve as a contact form. User adds their info, hit the button, data gets sent to list, which kicks off workflow that emails user’s contact info. A simple solution that removes the need for a developer to create a table in a database and having to code out an entry form.  While this works perfectly in a authenticated environment, the minute we turned on anonymous access in our UAT environment, the login popped up when users went to this page. Anonymous access won’t allow adds to lists by non-authenticated users by default. So scratch that solution.
    •  Also, if you don’t turn off mobile rendering in Central Admin, your internet-facing site will force a login to display on mobile phones. You want to turn this off for another reason-mobile rendering is horrible; it’s literally a list of links, and not the ones you want your users to see.
    • JavaScript also has issues with anonymous access. Our developer had used JavaScript to query lists and pull back data for several directories on ms.gov. We noticed issues in IE 7 first. We got those fixed and then when we tested with anonymous access we realized we had a problem-login prompts. I blogged previously about these issues. Thankfully Marc Anderson tipped us to his wonderful SPServices JQuery library and our developer was able to get his directories working with anonymous access. If you plan on using JavaScript to query lists or services, save yourself some misery and check out SPServices first.
  • Why So Slow?
    • We know the trend in web design now is large photos EVERYWHERE! That’s great and all, but SharePoint tends to be slower than regular websites already, adding huge images just makes it worse. We optimized all of our images as much as possible, made sure we used progressives jpegs, minified our css and js files, and still ms.gov was just too slow. I stumbled upon a setting in Site Settings that I had never noticed before: Site Collection Output Cache. Turn this on and set your profile to Public Internet and you should find that your site starts to perform better.
  • Large Lists Not Displaying for non-admins
    • If you have a list with more than 5000 items and you are querying it and the results are not showing up for non-admins, have your farm admin adjust the list view threshold. The default limit is 5000; raising it above the number of items in your list will allow the queries to function properly. If you have several lists that have over 5000 items you might want to look into other methods for handling so much data, but in a pinch this works well. Note that this setting is on a per site collection level.
  • Publish!
    • Ever run something all the way up the flagpole to production and then notice either missing image icons or logins popping up randomly? I bet one or more of your files isn’t really published. Depending on how your site was set up, you may have lists that require approvals before the assets are published, or you may have checked an item in and not published it. Go to site actions > Manage content and structure, and view all of the items in draft mode. This goes for reusable content list items as well.

Making SharePoint Responsive, Part 1

The hottest web trend right now seems to be “Responsive everything!!!!!!”. Well-done responsive websites are a good thing but are not necessarily easy to create. I recently had to retrofit a web application to make it mobile optimized and it was fairly painless, though trying to make complex forms responsive caused some rework. My programmer’s eyes glazed a bit when I told him what he had to do to each field to make it flow ever so nicely. Retrofitting more complex websites seems like an impossibility-it really does pay to be mobile first and design your sites with responsiveness in mind from the beginning.

My latest SharePoint project, a state agency website, was not designed to be responsive. The agency wanted it to resemble ms.gov and the mock ups they approved were of a fixed-width design with a few tricky design elements I had no idea how to build. Because I love pain, I decided “Let’s go responsive-with SharePoint!”. I used Twitter Bootstrap as my flexible grid and I created the base site design in Dreamweaver, as I do with all my sites. I tested it in IE and Chrome and my little media queries were working great. Then I pulled the code into SharePoint. And then the real pain began.

I use Randy Drisgill’s base masterpage as my starter for all my SharePoint sites, so I used it here as well. Unfortunately, for some reason when the viewport hit around 777 pixels it simply refused to respond any further. I removed all of my code line by line to see what was making SharePoint so angry. It was not the css, it was SharePoint, specifically, something being called from my masterpage. So I decided to try Kyle Shaeffer’s v5 Responsive masterpage. I added it to the site as is to verify that it worked before I made any changes. Happiness-it responded, no dreaded 777 pixel dead end. The masterpage has a bunch of controls  I never use so I stripped those out. The css was missing the magical code that makes images responsive so I added that. I pulled over the parts of Boostrap that mattered to me, the fluid grid classes, and left out all the non-grid styles. I integrated my code and voila! After, oh, maybe we are at 30 hours at this point since I rebuilt the masterpage like 4 times, I finally thought I had this sucker figured out.

I found the next issue when I started building out my page layouts. Certain admin screens, like checking in masterpages, site columns, contents types, pulled up an error. SharePoint has such lovely and useless error messages, they might as well say “you broke it You so dumb!” Eh. So today I opened my masterpage on one monitor, my standard masterpage on another, and I went down line by line and made sure every control that was in my regular masterpage was in my new one. The dreaded errors finally went away when I added all of the hidden controls. My regular maserpage had 20 hidden controls and my new one only had 16. Once I added the missing four the error just went away-I jumped up and squealed and decided I had earned a lemon ice for all my troubles.

I am happy to report that so far I have encountered no further issues with my new responsive masterpage. I am currently building out the page layouts and trying to get the site ready to start dumping content into it. I hope to launch this baby sometime next month. I still have several other technical challenges to overcome for this website, but I think I finally feel satisfied that I have created a fully responsive SharePoint 2010 site. I sooo need a nap..

More to come!