Dynamic and meaningful titles on our websites

Let’s work an important feature of our web apps: Page titles. These provides a better experience for the visitor.

While developing a website we use to have our broswer full crowded of tabs. The only way to know in which tab is the page we are looking for is by means of Page Title.

Meaningful_page_titles

1. Create a method that generates markup for the layout

2. Set a meaningful title using previously defined method. Neat detail is that we can use variables, so now our titles are dynamic!

3. Use title defined in the View. It’s a good practice to include a default value, “My Website” in the example code.

That’s all. The power to titles can be provided by variables defined and constructed¬†in controllers. Use methods of your models to obtain great titles.

About Franco Cedillo

Hi! I love reggae and flamenco music. I love web technologies and digital industry. Here i am to share some stuff :)
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s