GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: JavaScript Application Framework - JS library only

Changing your application’s title

If you don’t like the title of your application is just an URL such as ’’‘http://xxx.xxx.xx/static/example’’’, you can copy ’’‘index.rhtml’’’ from ’’‘default _src/lib/index.rhtml’’’ into your ’’‘clients/lib’’’ and change the “title” tag to whatever you like. For example, if you wanted to name your app “Hello World”, you’d do like this:

Step1: Copy ’’‘index.rhtml’’’ from ’’‘default _src/lib/index.rhtml’’’ into your ’’‘clients/lib’’’

mkdir clients/example/lib
cp default _src/lib/index.rhtml  clients/example/lib

Step2: Change the “title” tag to whatever you like.


<html>
   <head>
     <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
     <title>Hello World</title>

or in code…

In function() main {} in main.js, place the following code:

document.title = 'Your document title goes here.';

Or in Ruby

The default index.rhtml template includes support for setting your page’s title from any other RHTML template. If you are using the default template (and not using the steps above), simply declare the following in any RHTML file in your client:

<% @title = "Page Title" %>

Subsequent definitions will override each other.

Last edited by nciagra, 3 months ago
Versions: