Category: Best Practices

How to copy/paste clean code

Have you ever pasted content into the CMS, and it just doesn’t look right? You’re probably carrying old formatting code into the new CMS. Common culprits are copying from a Word document, copying text from one browser and pasting it into another, or copying text that was formatted in-line (using <span> and <style> tags directly in the code instead of letting the preformatted stylesheets do the work.)

Adding content with this type of formatting is bad for a couple of reasons:

  • It doesn’t let your page update with the rest of the CMS. We may decide to change the font size or style to make the site more accessible or to keep up with modern design trends. By using the standard heading (<h1>, <h2>, etc) and paragraph (<p>) tags, your content will be ready to shift in an instant. If you leave hard-coded styles in the page, your look won’t automatically change.
  • It can look strange on different devices. Everything on our new template is designed to expand and contract with the user’s screen size. Hard-coded styles may not change in the right way between desktop and mobile.
  • It’s annoying for you, the CMS user. Sometimes you’ll have lines and lines of needless code – annoying when you’re trying to find one or two words in pages of <span>s and <color>s. For example, look at the coding on the links below—the <u> and <span> tags make for messy code on the back and and ugly links on the front end.

Screen Shot 2017-06-30 at 2.38.47 PMScreen Shot 2017-06-30 at 2.40.52 PM

Website and Content Backups

There has been some confusion over what our CMS does and does not back up as a part of its revision process, so the purpose of this blog post is to clarify things.

Content Backups

Enterprise Content Management Systems store pieces of content. You have a Generic Page which stores the meat of your webpage’s content. However, there is more. Think of a sidebars and sliders (Highlights). Images. And navigation—made up of Navons. There are also Files. Maybe some Script items or Personnel Information items. All told, any given webpage is made up of 50-100 total individual items.

Any CMS does a good job of keeping track of revisions for these items. Each revision is basically a backup of that individual piece of content. As long as an item is not deleted (purged), we will have a history for that item. If the item is deleted, then its revision history is also deleted.

Avoid Duplicating Meta Descriptions

What is a Meta Description?

When looking at your content in the CMS, the meta description is populated from the “Description” field towards the top of the Properties > Parameters screen for the page. Between the “Title” and “Keywords” fields. The description provides Google and other search engines with a short, relevant summary of your webpage. When someone searches on Google, they see a list of the top results. In the results, there is the title of the webpage, the URL, and the description. Having a good description will help the user decide if they want to click on YOUR page, versus the other options.

External Links and Beware of the ‘Link Trolls’

As a web manager, you have a lot of responsibility. You have to keep your content “fresh” and accurate. It is a lot of work when you have 50+ webpages to manage along with various other job responsibilities. Making CMS updates typically falls under “and other duties assigned”—making things particularly difficult.

The ‘What’ and ‘Why’ of External Linking

We link to a lot of external websites—ones that Michigan Tech does not own or control. We link to resources about the local community and lodging, responsible research practices, and the products that our university uses. We link to information about disabilities. To our corporate partners’ websites. To sponsors, writing tips, and career advice.

Flexibility/Usability Tradeoff

As the flexibility of a system increases, its usability decreases. It sounds simple, but yet is so difficult to understand. Flexibility has costs. I would argue this holds true in general, but for now let’s focus on the web.

Making it ‘Foolproof’

Murphy’s Law claims, in part, that “nothing is foolproof to a sufficiently talented fool.” In basic terms, you cannot plan for everything. Rather, you should design and code for the critical mass of users needed to make your website successful. When you go overboard on flexibility, you decrease efficiency, added complexity, increase time, and spend more money for development. You may deliver a user experience that is worse than what you started with.

The Hierarchy of (Web) Needs

Being a web professional at a university can be difficult. Department chairs say things like “I want a website that looks different from everyone else.” A liaison says “I want the newest, craziest, most different website that you can make.” Everyone wants ‘cutting edge,’ although they don’t know what that means or why they are asking for it.

Those who don’t work in the web profession get lost in flashy designs, zany animations, and sparkles. They rarely analyze how many clicks it takes to get to the real information, how accessible a website is to those with disabilities, or how user-friendly a website is on an iPhone. They just want to be ‘wowed.’ Does their audience really want to be wowed, though?

Please Attribute Sources to Migrated Content in Blogs

Attention web liaisons: if you copy existing content into your department’s blog from a web page or another source, please ensure that you have given credit to the author(s) by adding a byline. This policy applies to content that is authored by any member of the campus community (except for Tech Today), including individuals within your department, not only content that originates outside of the University. Plagiarism charges may be filed if credit is not given where it is due.

Thank you.

– UMC Web Team

Note: This was originally posted on October 4th, 2012.