JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: new names for standard template sections
authorJason Woofenden <jason@jasonwoof.com>
Fri, 16 Sep 2011 22:35:05 +0000 (18:35 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Fri, 16 Sep 2011 22:35:05 +0000 (18:35 -0400)
The new convention is to use the `$` prefix for sections perhaps variables that
are global to the document/article. This way you needn't worry about naming
conflicts (so long as your other data doesn't start with `$`.

Specificially, these were changed:

main_title -> $title
extra_headers -> $head
main_body -> $body

metaform/site-template.html
metaform/template.html
metaform/template.php

index 11ceb40..0298f9c 100644 (file)
@@ -1,15 +1,15 @@
 <!DOCTYPE html>
-<html>
+<html lang="us">
 <head>
        <meta charset="utf-8" />
-       <title>~main-title html~</title>
+       <title>~$title html~</title>
        <!--[if lt IE 9]>
                <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <script>less = {env:'development'};</script>
        <link rel="stylesheet/less" href="style_01.less" />
        <script src="http://lesscss.googlecode.com/files/less-1.0.41.min.js"></script>
-       <!--~extra-headers~-->
+       <!--~$head~-->
 </head>
 
 <body>
@@ -36,7 +36,7 @@
                        <!--~}~-->
 
                        <article>
-                               ~main_body~
+                               ~$body~
                        </article>
 
                </div>
index 6602896..5b2b372 100644 (file)
@@ -3,8 +3,8 @@
 <html>
 <head>
        <meta charset="utf-8" />
-       <title><!--~~main_title show {~~-->~plural cap~<!--~~}~~--></title>
-       <link rel="stylesheet" href="style.css" type="text/css"><!--~html_editor_headers {~--><!--~~extra_headers {~~-->
+       <title><!--~~$title show {~~-->~plural cap~<!--~~}~~--></title>
+       <link rel="stylesheet" href="style.css" type="text/css"><!--~html_editor_headers {~--><!--~~$head {~~-->
        <script type="text/javascript" src="code/ckeditor/ckeditor.js"></script>
        <script language="javascript" type="text/javascript">
                function make_wysiwyg(name) {
@@ -18,7 +18,7 @@
 </head>
 
 <body>
-<!--~~main_body show {~~--><!--~opt_display {~-->
+<!--~~$body show {~~--><!--~opt_display {~-->
        <!--~~display {~~-->
                <h2>~singular cap~ details</h2>
 
index 47bd90e..4db9dad 100644 (file)
@@ -221,5 +221,5 @@ function ~file_name~_main_form($id = false) {~pulldowns {~
        tem_set('upload_max_filesize', upload_max_filesize());~}~
 
        tem_set('form', $data);~show_extra_headers {~
-       tem_set('extra_headers');~}~
+       tem_set('$head');~}~
 }