Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Tuesday, 6 March 2012

Ruby on Rails Page Titles


Accurate page titles are an important part of the SEO for any website. However the architecture of a modern web application relies on the content for each individual page being surrounded by a single layout to help keep the overall layout easy to maintain.

This can have a detrimental effect on SEO as Google (and the others) don’t approve of repetition of page titles as it doesn’t provide helpful information to your users. 

The Rails Approach to Page titles

Let’s setup your app so you can have custom page titles and a fall back title for those you forget.
First in your application.html.erb file (or the page you are using for the layout) add this line of text:

<title><%= content_for?(:title) ? content_for(:title) : "Beo | London based results driven web design & development" %></title>


Here are the standard <title> tags for your website with a dynamic bit of code in-between. The code looks to see if you have a custom title and if not displays the default page title (but remember this is something we are trying to avoid!).  

Next we need to add in the method referenced above, in your application_helper.rb file add this:

def title(page_title)
  content_for(:title) { page_title }
end




Now we need to go to each of our individual pages and insert a line of code, for example on our services.html.erb page we have:



<%- title "Beo | London based results driven web design & development | Services" %>


Again, it’s pretty simple, the code passes the hard coded title to the helper which in turn passes it to the application layout.

Go through each of your pages adding in some custom text for each title.

SEO tips from www.beo.so







Thursday, 23 February 2012

Great design = Great websites?


Yes and no.

A recent Ski holiday to the Alps proved and long held belief of mine on what makes a truly great website.

Take a look at the two websites below:


A

(Click to enlarge)
B

(Click to enlarge)

Which do you think is the best designed website? Many of you would no doubt go for B.
Now let me ask you which you think I found the most helpful during my holiday and which website I came back to for information. The answer is A.

Why A?

A isn’t particularly well designed, boring some might say, but the reason behind my visit to both websites was to get information on the resort I was visiting. B looked ok but the information was hidden behind menus and flashy graphics, I got annoyed navigating around looking for information I couldn’t find. This is a fatal sin in the web design world, your website is there to serve a purpose, whether that is to pass on information or sell to your customers. If you frustrate your users you will lose them.

The perfect solution?

Is the content of A but with a modern and clean design that works for the user rather than against. That’s the kind of websites we build at Beo.