ソースを参照

Fix outdated themes documentation for indexes.

The one thing I miss in the docs sweep before the last release
and my friend trips all over it. God dammit software.
Brit Butler 11 年 前
コミット
6ea3166a8b
共有1 個のファイルを変更した4 個の追加4 個の削除を含む
  1. 4 4
      docs/themes.md

+ 4 - 4
docs/themes.md

@@ -144,7 +144,7 @@ The variable that should be available to all templates is:
144 144
 - **index**        This is the meat of the content. This variable has
145 145
                    the following keys:
146 146
    - `id`,    the name of the page that will be rendered
147
-   - `posts`, a list of posts (see below)
147
+   - `content`, a list of content (see below)
148 148
    - `title`, a string title to display to the user
149 149
 - **prev**         If this index file is part of a chain, the `id`
150 150
                    of the previous index html in the chain.
@@ -189,9 +189,9 @@ A simple `index.tmpl` looks like this:
189 189
 ```
190 190
 {namespace coleslaw.theme.trivial}
191 191
 {template index}
192
-{foreach $post in $index.posts}
193
-<h1>{$post.title}</h1>
194
-  {$post.text |noAutoescape}
192
+{foreach $obj in $index.content}
193
+<h1>{$obj.title}</h1>
194
+  {$obj.text |noAutoescape}
195 195
 {/foreach}
196 196
 {/template}
197 197
 ```