Skip to content

Commit

Permalink
set page title directly in html and not through js
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Nov 25, 2011
1 parent 1b094e8 commit 46bb338
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 16 deletions.
5 changes: 1 addition & 4 deletions tpl/en/blog_main.mtt
@@ -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"/>
Expand Down
5 changes: 1 addition & 4 deletions tpl/en/blog_post.mtt
@@ -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::
Expand Down
2 changes: 1 addition & 1 deletion tpl/en/design.mtt
Expand Up @@ -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"/>
Expand Down
5 changes: 1 addition & 4 deletions tpl/en/entry.mtt
@@ -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>
Expand Down
3 changes: 2 additions & 1 deletion tpl/en/forum_main.mtt
@@ -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">
Expand Down
3 changes: 2 additions & 1 deletion tpl/en/forum_post.mtt
@@ -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">
Expand Down
3 changes: 2 additions & 1 deletion tpl/en/forum_thread.mtt
@@ -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">
Expand Down
2 changes: 2 additions & 0 deletions tpl/tmp/.gitignore
@@ -0,0 +1,2 @@

*.php

0 comments on commit 46bb338

Please sign in to comment.