Better HTML title handling in Roller

users, JRoller users, IBM folks, and everyone else, a little tweaking to you blog page can make your user’s life easier, especially for (social) bookmarking.

Thanks to Dave Johnson, here’s how to have your blog use the entry title if the page is a single-entry page (permalink typically) and weblog title/description otherwise:

Using Roller 2.x: “Preferences” -> “Templates” -> “Weblog” Edit -> locate the <title> </title> tags and replace them with the following:


#if
($pageModel.getWeblogEntry())
  
<title>#showWebsiteTitle():
$pageModel.getWeblogEntry().title</title>
#else
  
<title>#showWebsiteTitle():
#showWebsiteDescription()</title>
#end

Works great for me!

Ideally this will be baked into all Roller themes.

Advertisements

Author: alexismp

Google Developer Relations in Paris.

1 thought on “Better HTML title handling in Roller”

Comments are closed.