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

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

 

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.

My First SharePoint 2010 Public Site Launched!

ms.gov | The Official State Website of Mississippi

ms.gov | The Official State Website of Mississippi

The new state website for Mississippi is finally live! ms.gov is the first SharePoint site I have worked on since 2006 that is not hidden behind a firewall and it was a ton of work but it is now up and available for all to see! Through Mississippi Interactive (subsidiary of NIC), my day job is to design and build web sites and applications for the state of Mississippi. The new portal is the first redesign of Mississippi’s portal in over ten years and was a major effort by myself and everyone at Mississippi Interactive.

The site is built with SharePoint 2010 and has quite a bit of JQuery going on to enhance the UI (thanks to our developer and my web slinging counterpart, Jesse Kyzar, for creating all the JQuery and web service grooviness!). This release is our “beta” and we will be adding more features and functionality over the coming months. I will start posting some insights into how we developed certain pieces as time allows (we are very busy with a full project queue!).

Ok, enough bragging, go see the site!

UPDATE: SharePoint 2010, IE 7, and JQuery Issues

This is an update to an earlier post about issues with the style library, IE 7, javascript, REST interface, and anonymous access (yea, it was a lot of stuff). Here is what we have learned:

  • If you have publishing turned on, you have to make double triple dog sure that your files are PUBLISHED when you push to test, uat, prod, whatever. If anything is in draft mode and you have anonymous access turned on user will get a login screen. We thought there was an issue with the Style Library and anonymous access but it was just files in draft mode causing the problem. You can check for draft files and publish them by using Site Actions > Manage Content and Structure
  • If you are using the REST interface with javascript it won’t work once you turn on anonymous access. You will have to redo your code or find a different solution-our programmer is busy right this second redoing all the beautiful code he wrote because we had no idea it didn’t flippin work when anonymous access was turned on 😦 We tried everything we could to make it work-we reached out to all the SharePoint pros at our company, on the web, even called SharePoint 911 (why is it whenever I call SharePoint 911 I have an issue that is impossible to fix??). So, in short, wanna use the REST interface? Don’t use javascript to query your lists, write a custom service instead.
  • I think the last issue was IE7 not liking Jquery. Our programmer had to rewrite his code a bit to make it play nice iwth IE 7-I’ll get him to tell me exactly what he did so I can let you guys know 😉

We are sooo close to launching the new ms.gov, just a few more days!!!! I designed this little guy over the New Years holiday (holiday? HA!).

Faking Reusable Content Lists in SharePoint 2010

In my last post I was complaining about how I can’t get the reusable content lists to work right in SharePoint 2010. No matter what I do, or on what page in my site, if I add a reusable html item, the code is displayed rather than being rendered by the browser. After having to manually add side navigation to dozens of pages I said “truck this, there’s gotta be an easier way-mothertrucking Sharepoint!&*” (yea, i’m a dork). We have a folder that we created in Designer at the root of our site collection called “snippets”. We (by “we” I mean myself and my programmer partner in web crime, Jesse Kyzar) use this folder to store small bits of code that we use on the site. I created a blank html page, stripped out everything in it and just added the side nav code. I then added a content editor web part to the side column on one of my site pages and I connected the webpart to pull the html snippet file. Works perfectly. It takes a few extra steps to add and configure the CEWP on each page but it is a lot faster to add the CEWP’s and then update one file rather than worry about having to update dozens of pages if my nav content changes.

If anyone figures out why the reusable content list doesn’t work the way it used to please share. Until then I’m gonna do my method and just pretend the reusable content list doesn’t exist.

 

UPDATE 6/04/2012: Thanks to reader Aneville for cluing me in on why it was not working. Apparently I had a brain fart and was putting my html in the visual editor instead of the raw html dialog. When I add the content directly in to the html dialog it all works perfectly. I was seriously over thinking this and made something simple way to complicated. Thanks Aneville and everyone else who responded!!!