Warning: Illegal string offset 'width' in /home/akeisah/brainlava.com/admin/wp-includes/media.php on line 1101
Warning: Illegal string offset 'width' in /home/akeisah/brainlava.com/admin/wp-includes/media.php on line 1108
Sometimes as a SharePoint front-end developer you have to sacrifice the desire for the leanest code possible in order to create a better authoring experience. Take for example the common requirement for authors to add Quick Links to a page. The Summary Link Web Part is perfect for this task but I would often overlook it because it generates unnecessary HTML. Instead, if a stylized list was required, I would create a Reusable Content snippet or a custom style that would appear in the Styles drop down. It kept my code nice and clean and I thought both options were relatively easy to use.
Well, I was not entirely correct on that last assumption. Sure they might be easy if the author has a basic understanding of HTML, but without that knowledge these methods can become frustrating. At some point the author will perform an unexpected keystroke in the rich text editor, causing something to go awry. Maybe it’s an odd line break or a tag that will not seem to close. At that point they can delete what they have done and start again, or look at the HTML and see if they can track down the issue. For an author that only wants to have the page published as soon as possible, both options could be time consuming and less than desirable.
This is where the Summary Link Web Part comes into play. I find myself leveraging this particular web part much more often, spending the time to ensure that all the built in styles work with the overall design of the site. This gives the author many more options to add stylized links to the page without having to fiddle with any code. They simply fill out the fields in the add new link dialog and click OK. They can also easily group and reorder links without having to deal with the mess that can happen when you copy and paste in a rich text editor.
Does the bloated mark-up still bother me? Sure it does, but when I train authors and see how much easier it is for them to use this web part compared to watching them struggle with code snippets, I feel the trade off is acceptable.
Interested in seeing what the Summary Link Web Part can do? Check out Microsoft’s “Use and configure a Summary Link Web Part or a Summary Link field control” article for a step by step explanation on how to use its functions.