$template_dir
is the folder of which theme you are using. It is dependent on the theme parameter on the URL.e.g.
if a theme is non-existent.
e.g. http://cms.b2b.com.ph/rbcms/index.php?theme=nothing
the theme selected the default theme that is defined on the theme's template.
Sample Usage
<link href="{$template_dir}gallery.css" rel="stylesheet" type="text/css" >
HTML Source Output
Sample #1: no theme parameter is set. Uses default theme.<link href="_templates/main/gallery.css" rel="stylesheet" type="text/css" >
Sample #2: if the theme parameter is set to "test". e.g. http://cms.b2b.com.ph/rbcms/index.php?theme=test
<link href="_templates/test/gallery.css" rel="stylesheet" type="text/css" >
Sample #3: if the theme parameter is set to "nothing". e.g. http://cms.b2b.com.ph/rbcms/index.php?theme=nothing
Theme does not exists, therefore uses the default theme.
<link href="_templates/main/gallery.css" rel="stylesheet" type="text/css" >
See also $relative_template_dir, it is more powerful that $template_dir.