Permalink
Browse files

set page title directly in html and not through js

  • Loading branch information...
1 parent 1b094e8 commit 46bb338fadb8e3a6d093a90debd8a47fefb691c6 ncannasse committed Nov 25, 2011
Showing with 12 additions and 16 deletions.
  1. +1 −4 tpl/en/blog_main.mtt
  2. +1 −4 tpl/en/blog_post.mtt
  3. +1 −1 tpl/en/design.mtt
  4. +1 −4 tpl/en/entry.mtt
  5. +2 −1 tpl/en/forum_main.mtt
  6. +2 −1 tpl/en/forum_post.mtt
  7. +2 −1 tpl/en/forum_thread.mtt
  8. +2 −0 tpl/tmp/.gitignore
View
@@ -1,12 +1,9 @@
::use 'design.mtt'::
<div class="blog main">
+::set pageTitle = entry._title::
<h1 class="title"><a href="/::entry._path::">::entry._title::</a></h1>
-<script type="text/javascript">
- document.title = '::config.title:: - ::entry._title::';
-</script>
-
<form action="/wiki/edit" class="create" method="GET" ::cond request.exists("create")::>
<span class="tfield">Title :</span> <input name="title" class="field" onkeyup="document.getElementById('id_path').value = '::entry._path::/' + Editor.normalize(this.value)"/>
<span class="tfield">URL :</span> <input id="id_path" name="path" class="field"/>
View
@@ -1,12 +1,9 @@
::use 'design.mtt'::
<div class="blog post">
+::set pageTitle = entry._title::
<h1 class="title"><a href="/::entry._path::">::entry._title::</a></h1>
-<script type="text/javascript">
- document.title = '::config.title:: - ::entry._title::';
-</script>
-
::set eparams = 'path='+entry._path+';lang='+entry._lang.code::
::if version == null::
View
@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
- <title>::config.title::</title>
+ <title>::if pageTitle::::pageTitle:: - ::end::::config.title::</title>
<link rel="stylesheet" type="text/css" href="/css/::config.style::.css"/>
::raw '<!--[if IE 6]>'::
<link rel="stylesheet" type="text/css" href="/css/::config.style::_ie6.css"/>
View
@@ -1,11 +1,8 @@
::use 'design.mtt'::
+::set pageTitle = entry._title::
<h1 class="title"><a href="/::entry._path::">::entry._title::</a></h1>
-<script type="text/javascript">
- document.title = '::config.title:: - ::entry._title::';
-</script>
-
<div class="hierarchy">
::foreach e entry.getList()::
::if !repeat.e.first:: &gt;::end:: <a href="/::e._path::">::e._title::</a>
View
@@ -1,6 +1,7 @@
-::use 'design.mtt'::
+::use 'design.mtt'::
<div class="forum">
+::set pageTitle = entry._title::
<h1><a href="::path::">::entry._title::</a></h1>
<table class="threads">
View
@@ -1,7 +1,8 @@
-::use 'design.mtt'::
+::use 'design.mtt'::
<div class="forum">
+::set pageTitle = entry._title::
<h1><a href="::path::">::entry._title::</a> &gt; ::if thread:: <a href="::path::/thread/::thread.id::">::thread.title::</a> &gt; Reply::else:: New Topic ::end:: </h1>
<ul class="msg">
View
@@ -1,7 +1,8 @@
-::use 'design.mtt'::
+::use 'design.mtt'::
<div class="forum">
+::set pageTitle = entry._title::
<h1><a href="::path::">::entry._title::</a> &gt; ::thread.title::</h1>
<ul class="msg">
View
@@ -0,0 +1,2 @@
+
+*.php

0 comments on commit 46bb338

Please sign in to comment.